Enum EthVersion
#[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§
§impl EthVersion
impl EthVersion
pub const LATEST: EthVersion = Self::Eth71
pub const LATEST: EthVersion = Self::Eth71
The latest known eth version
pub const ALL_VERSIONS: &'static [EthVersion]
pub const ALL_VERSIONS: &'static [EthVersion]
All known eth versions
pub 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.
pub 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§
§impl<'arbitrary> Arbitrary<'arbitrary> for EthVersion
impl<'arbitrary> Arbitrary<'arbitrary> for EthVersion
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<EthVersion, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<EthVersion, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<EthVersion, Error>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<EthVersion, Error>
Self from the entirety of the given
unstructured data. Read more§impl Clone for EthVersion
impl Clone for EthVersion
§fn clone(&self) -> EthVersion
fn clone(&self) -> EthVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EthVersion
§impl Debug for EthVersion
impl Debug for EthVersion
§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).
§fn decode(buf: &mut &[u8]) -> Result<EthVersion, Error>
fn decode(buf: &mut &[u8]) -> Result<EthVersion, Error>
buf must be advanced past
the decoded object.§impl<'de> Deserialize<'de> for EthVersion
impl<'de> Deserialize<'de> for EthVersion
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EthVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EthVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Display for EthVersion
impl Display for EthVersion
§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
§impl From<EthVersion> for Capability
impl From<EthVersion> for Capability
§fn from(value: EthVersion) -> Capability
fn from(value: EthVersion) -> Capability
Source§impl From<EthVersion> for Protocol
impl From<EthVersion> for Protocol
Source§fn from(version: EthVersion) -> Self
fn from(version: EthVersion) -> Self
§impl FromStr for EthVersion
impl FromStr for EthVersion
§type Err = ParseVersionError
type Err = ParseVersionError
§fn from_str(s: &str) -> Result<EthVersion, <EthVersion as FromStr>::Err>
fn from_str(s: &str) -> Result<EthVersion, <EthVersion as FromStr>::Err>
s to return a value of this type. Read more§impl Hash for EthVersion
impl Hash for EthVersion
§impl Ord for EthVersion
impl Ord for EthVersion
§fn cmp(&self, other: &EthVersion) -> Ordering
fn cmp(&self, other: &EthVersion) -> Ordering
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,
§impl PartialEq for EthVersion
impl PartialEq for EthVersion
§impl PartialOrd for EthVersion
impl PartialOrd for EthVersion
§impl Serialize for EthVersion
impl Serialize for EthVersion
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EthVersion
§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);§type Error = ParseVersionError
type Error = ParseVersionError
§fn try_from(s: &str) -> Result<EthVersion, <EthVersion as TryFrom<&str>>::Error>
fn try_from(s: &str) -> Result<EthVersion, <EthVersion as TryFrom<&str>>::Error>
§impl TryFrom<u8> for EthVersion
Allow for converting from a u8 to an EthVersion.
impl TryFrom<u8> for EthVersion
Allow for converting from a u8 to an EthVersion.
§Example
use reth_eth_wire_types::EthVersion;
let version = EthVersion::try_from(67).unwrap();
assert_eq!(version, EthVersion::Eth67);§type Error = ParseVersionError
type Error = ParseVersionError
§fn try_from(u: u8) -> Result<EthVersion, <EthVersion as TryFrom<u8>>::Error>
fn try_from(u: u8) -> Result<EthVersion, <EthVersion as TryFrom<u8>>::Error>
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