Struct StatusBuilder
pub struct StatusBuilder { /* private fields */ }Expand description
Builder type for constructing a UnifiedStatus message.
Implementations§
§impl StatusBuilder
impl StatusBuilder
pub const fn build(self) -> UnifiedStatus
pub const fn build(self) -> UnifiedStatus
Consumes the builder and returns the constructed UnifiedStatus.
pub const fn version(self, version: EthVersion) -> StatusBuilder
pub const fn version(self, version: EthVersion) -> StatusBuilder
Sets the eth protocol version (e.g., eth/66, eth/70).
pub const fn chain(self, chain: Chain) -> StatusBuilder
pub const fn chain(self, chain: Chain) -> StatusBuilder
Sets the chain ID
pub const fn genesis(self, genesis: FixedBytes<32>) -> StatusBuilder
pub const fn genesis(self, genesis: FixedBytes<32>) -> StatusBuilder
Sets the genesis block hash of the chain.
pub const fn forkid(self, forkid: ForkId) -> StatusBuilder
pub const fn forkid(self, forkid: ForkId) -> StatusBuilder
Sets the fork ID, used for fork compatibility checks.
pub const fn blockhash(self, blockhash: FixedBytes<32>) -> StatusBuilder
pub const fn blockhash(self, blockhash: FixedBytes<32>) -> StatusBuilder
Sets the block hash of the current head.
pub const fn total_difficulty(self, td: Option<Uint<256, 4>>) -> StatusBuilder
pub const fn total_difficulty(self, td: Option<Uint<256, 4>>) -> StatusBuilder
Sets the total difficulty, if relevant (Some for eth/66–68).
pub const fn earliest_block(self, earliest: Option<u64>) -> StatusBuilder
pub const fn earliest_block(self, earliest: Option<u64>) -> StatusBuilder
Sets the earliest available block, if known (Some for eth/69).
pub const fn latest_block(self, latest: Option<u64>) -> StatusBuilder
pub const fn latest_block(self, latest: Option<u64>) -> StatusBuilder
Sets the latest known block, if known (Some for eth/69).
Trait Implementations§
§impl Debug for StatusBuilder
impl Debug for StatusBuilder
§impl Default for StatusBuilder
impl Default for StatusBuilder
§fn default() -> StatusBuilder
fn default() -> StatusBuilder
Auto Trait Implementations§
impl Freeze for StatusBuilder
impl RefUnwindSafe for StatusBuilder
impl Send for StatusBuilder
impl Sync for StatusBuilder
impl Unpin for StatusBuilder
impl UnsafeUnpin for StatusBuilder
impl UnwindSafe for StatusBuilder
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
§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 more§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: 176 bytes