#[repr(u8)]pub enum EthVersion {
Eth66 = 66,
Eth67 = 67,
Eth68 = 68,
Eth69 = 69,
Eth70 = 70,
Eth71 = 71,
Eth72 = 72,
}Expand description
The eth protocol version.
Variants§
Eth66 = 66
The eth protocol version 66.
Eth67 = 67
The eth protocol version 67.
Eth68 = 68
The eth protocol version 68.
Eth69 = 69
The eth protocol version 69.
Eth70 = 70
The eth protocol version 70.
EIP-7975 adds partial block receipt
lists by extending GetReceipts and Receipts with pagination fields.
Eth71 = 71
The eth protocol version 71.
EIP-8159 adds block access list
exchange with GetBlockAccessLists and BlockAccessLists.
Eth72 = 72
The eth protocol version 72.
EIP-8070 adds sparse blobpool
support by extending NewPooledTransactionHashes with cell_mask and adding
GetCells and Cells.
Implementations§
Source§impl EthVersion
impl EthVersion
Sourcepub const ALL_VERSIONS: &'static [Self]
pub const ALL_VERSIONS: &'static [Self]
All known eth versions
Sourcepub const fn has_eth68_metadata(&self) -> bool
pub const fn has_eth68_metadata(&self) -> bool
Returns true if the version carries eth/68 transaction announcement metadata.
Sourcepub const fn is_eth69_or_newer(&self) -> bool
pub const fn is_eth69_or_newer(&self) -> bool
Returns true if the version is eth/69 or newer.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for EthVersion
Available on crate features arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for EthVersion
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§impl Clone for EthVersion
impl Clone for EthVersion
impl Copy for EthVersion
Source§impl Debug for EthVersion
impl Debug for EthVersion
Source§impl Decodable for EthVersion
RLP decodes a single byte into EthVersion.
Returns error if byte is not a valid version (66-72).
impl Decodable for EthVersion
RLP decodes a single byte into EthVersion.
Returns error if byte is not a valid version (66-72).
Source§impl<'de> Deserialize<'de> for EthVersion
Available on crate feature serde only.
impl<'de> Deserialize<'de> for EthVersion
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for EthVersion
impl Display for EthVersion
Source§impl Encodable for EthVersion
RLP encodes EthVersion as a single byte (66-72).
impl Encodable for EthVersion
RLP encodes EthVersion as a single byte (66-72).
impl Eq for EthVersion
Source§impl From<EthVersion> for u8
impl From<EthVersion> for u8
Source§fn from(v: EthVersion) -> Self
fn from(v: EthVersion) -> Self
Source§impl From<EthVersion> for &'static str
impl From<EthVersion> for &'static str
Source§fn from(v: EthVersion) -> &'static str
fn from(v: EthVersion) -> &'static str
Source§impl From<EthVersion> for Capability
impl From<EthVersion> for Capability
Source§fn from(value: EthVersion) -> Self
fn from(value: EthVersion) -> Self
Source§impl FromStr for EthVersion
impl FromStr for EthVersion
Source§impl Hash for EthVersion
impl Hash for EthVersion
Source§impl Ord for EthVersion
impl Ord for EthVersion
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for EthVersion
impl PartialEq for EthVersion
Source§impl PartialOrd for EthVersion
impl PartialOrd for EthVersion
Source§impl Serialize for EthVersion
Available on crate feature serde only.
impl Serialize for EthVersion
serde only.impl StructuralPartialEq for EthVersion
Source§impl TryFrom<&str> for EthVersion
Allow for converting from a &str to an EthVersion.
impl TryFrom<&str> for EthVersion
Allow for converting from a &str to an EthVersion.
§Example
use reth_eth_wire_types::EthVersion;
let version = EthVersion::try_from("67").unwrap();
assert_eq!(version, EthVersion::Eth67);Auto Trait Implementations§
impl Freeze for EthVersion
impl RefUnwindSafe for EthVersion
impl Send for EthVersion
impl Sync for EthVersion
impl Unpin for EthVersion
impl UnsafeUnpin for EthVersion
impl UnwindSafe for EthVersion
Blanket Implementations§
impl<A> ArbInterop for A
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Eth66: 0 bytesEth67: 0 bytesEth68: 0 bytesEth69: 0 bytesEth70: 0 bytesEth71: 0 bytesEth72: 0 bytes