Struct EthProtocolInfo
pub struct EthProtocolInfo {
pub network: u64,
pub difficulty: Option<Uint<256, 4>>,
pub genesis: FixedBytes<32>,
pub config: ChainConfig,
pub head: FixedBytes<32>,
}Expand description
Represents a short summary of the eth sub-protocol metadata known about the host peer.
See geth’s NodeInfo
struct
for how these fields are determined.
Fields§
§network: u64The eth network version.
difficulty: Option<Uint<256, 4>>difficulty is being removed from admin_nodeInfo, see https://github.com/ethereum/go-ethereum/pull/30744
The total difficulty of the host’s blockchain.
NOTE: This is deprecated as total difficulty related fields are being removed from RPC, since the merge has long passed.
See changes to geth’s NodeInfo structs:
genesis: FixedBytes<32>The Keccak hash of the host’s genesis block.
config: ChainConfigThe chain configuration for the host’s fork rules.
head: FixedBytes<32>The hash of the host’s best known block.
Trait Implementations§
§impl Clone for EthProtocolInfo
impl Clone for EthProtocolInfo
§fn clone(&self) -> EthProtocolInfo
fn clone(&self) -> EthProtocolInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for EthProtocolInfo
impl Debug for EthProtocolInfo
§impl<'de> Deserialize<'de> for EthProtocolInfo
impl<'de> Deserialize<'de> for EthProtocolInfo
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EthProtocolInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EthProtocolInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for EthProtocolInfo
§impl PartialEq for EthProtocolInfo
impl PartialEq for EthProtocolInfo
§impl Serialize for EthProtocolInfo
impl Serialize for EthProtocolInfo
§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 EthProtocolInfo
Auto Trait Implementations§
impl Freeze for EthProtocolInfo
impl RefUnwindSafe for EthProtocolInfo
impl Send for EthProtocolInfo
impl Sync for EthProtocolInfo
impl Unpin for EthProtocolInfo
impl UnsafeUnpin for EthProtocolInfo
impl UnwindSafe for EthProtocolInfo
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> MaybeDebug for Twhere
T: Debug,
impl<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: 712 bytes