pub struct BlockHeaderFromRpc {Show 23 fields
pub base_fee_per_gas: Option<String>,
pub blob_gas_used: Option<String>,
pub difficulty: String,
pub excess_blob_gas: Option<String>,
pub extra_data: String,
pub gas_limit: String,
pub gas_used: String,
pub hash: String,
pub logs_bloom: String,
pub miner: String,
pub mix_hash: String,
pub nonce: String,
pub number: String,
pub parent_beacon_block_root: Option<String>,
pub parent_hash: String,
pub receipts_root: String,
pub sha3_uncles: String,
pub size: String,
pub state_root: String,
pub timestamp: String,
pub total_difficulty: String,
pub transactions_root: String,
pub withdrawals_root: Option<String>,
}Expand description
Block header returned from RPC https://ethereum.org/en/developers/docs/apis/json-rpc#eth_getblockbynumber
Fields§
§base_fee_per_gas: Option<String>§blob_gas_used: Option<String>§difficulty: String§excess_blob_gas: Option<String>§extra_data: String§gas_limit: String§gas_used: String§hash: String§logs_bloom: String§miner: String§mix_hash: String§nonce: String§number: String§parent_beacon_block_root: Option<String>§parent_hash: String§receipts_root: String§sha3_uncles: String§size: String§state_root: String§timestamp: String§total_difficulty: String§transactions_root: String§withdrawals_root: Option<String>Implementations§
Source§impl BlockHeaderFromRpc
impl BlockHeaderFromRpc
pub fn get_block_hash(&self) -> String
Trait Implementations§
Source§impl Clone for BlockHeaderFromRpc
impl Clone for BlockHeaderFromRpc
Source§fn clone(&self) -> BlockHeaderFromRpc
fn clone(&self) -> BlockHeaderFromRpc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockHeaderFromRpc
impl Debug for BlockHeaderFromRpc
Source§impl<'de> Deserialize<'de> for BlockHeaderFromRpc
impl<'de> Deserialize<'de> for BlockHeaderFromRpc
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&BlockHeaderFromRpc> for Header
impl From<&BlockHeaderFromRpc> for Header
Source§fn from(value: &BlockHeaderFromRpc) -> Self
fn from(value: &BlockHeaderFromRpc) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlockHeaderFromRpc
impl RefUnwindSafe for BlockHeaderFromRpc
impl Send for BlockHeaderFromRpc
impl Sync for BlockHeaderFromRpc
impl Unpin for BlockHeaderFromRpc
impl UnwindSafe for BlockHeaderFromRpc
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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