#[repr(u8)]pub enum EthMessageID {
Show 21 variants
Status = 0,
NewBlockHashes = 1,
Transactions = 2,
GetBlockHeaders = 3,
BlockHeaders = 4,
GetBlockBodies = 5,
BlockBodies = 6,
NewBlock = 7,
NewPooledTransactionHashes = 8,
GetPooledTransactions = 9,
PooledTransactions = 10,
GetNodeData = 13,
NodeData = 14,
GetReceipts = 15,
Receipts = 16,
BlockRangeUpdate = 17,
GetBlockAccessLists = 18,
BlockAccessLists = 19,
GetCells = 20,
Cells = 21,
Other(u8),
}Expand description
Represents message IDs for eth protocol messages.
Variants§
Status = 0
Status message.
NewBlockHashes = 1
New block hashes message.
Transactions = 2
Transactions message.
GetBlockHeaders = 3
Get block headers message.
BlockHeaders = 4
Block headers message.
GetBlockBodies = 5
Get block bodies message.
BlockBodies = 6
Block bodies message.
NewBlock = 7
New block message.
NewPooledTransactionHashes = 8
New pooled transaction hashes message.
GetPooledTransactions = 9
Requests pooled transactions.
PooledTransactions = 10
Represents pooled transactions.
GetNodeData = 13
Requests node data.
NodeData = 14
Represents node data.
GetReceipts = 15
Requests receipts.
Receipts = 16
Represents receipts.
BlockRangeUpdate = 17
Block range update.
Introduced in Eth69
GetBlockAccessLists = 18
Requests block access lists.
Introduced in Eth71
BlockAccessLists = 19
Represents block access lists.
Introduced in Eth71
GetCells = 20
Requests cells.
Introduced in Eth72
Cells = 21
Represents Cells
Introduced in Eth72
Other(u8)
Represents unknown message types.
Implementations§
Source§impl EthMessageID
impl EthMessageID
Sourcepub const fn max(version: EthVersion) -> u8
pub const fn max(version: EthVersion) -> u8
Returns the max value for the given version.
Sourcepub const fn message_count(version: EthVersion) -> u8
pub const fn message_count(version: EthVersion) -> u8
Returns the total number of message types for the given version.
This is used for message ID multiplexing.
Trait Implementations§
Source§impl Clone for EthMessageID
impl Clone for EthMessageID
impl Copy for EthMessageID
Source§impl Debug for EthMessageID
impl Debug for EthMessageID
Source§impl Decodable for EthMessageID
impl Decodable for EthMessageID
Source§impl<'de> Deserialize<'de> for EthMessageID
Available on crate feature serde only.
impl<'de> Deserialize<'de> for EthMessageID
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 Encodable for EthMessageID
impl Encodable for EthMessageID
impl Eq for EthMessageID
Source§impl PartialEq for EthMessageID
impl PartialEq for EthMessageID
Source§impl Serialize for EthMessageID
Available on crate feature serde only.
impl Serialize for EthMessageID
serde only.impl StructuralPartialEq for EthMessageID
Auto Trait Implementations§
impl Freeze for EthMessageID
impl RefUnwindSafe for EthMessageID
impl Send for EthMessageID
impl Sync for EthMessageID
impl Unpin for EthMessageID
impl UnsafeUnpin for EthMessageID
impl UnwindSafe for EthMessageID
Blanket Implementations§
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<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: 2 bytes
Size for each variant:
Status: 0 bytesNewBlockHashes: 0 bytesTransactions: 0 bytesGetBlockHeaders: 0 bytesBlockHeaders: 0 bytesGetBlockBodies: 0 bytesBlockBodies: 0 bytesNewBlock: 0 bytesNewPooledTransactionHashes: 0 bytesGetPooledTransactions: 0 bytesPooledTransactions: 0 bytesGetNodeData: 0 bytesNodeData: 0 bytesGetReceipts: 0 bytesReceipts: 0 bytesBlockRangeUpdate: 0 bytesGetBlockAccessLists: 0 bytesBlockAccessLists: 0 bytesGetCells: 0 bytesCells: 0 bytesOther: 1 byte