pub struct ChainBlock {
pub height: u64,
pub hash: String,
pub parent_hash: String,
pub timestamp: i64,
pub tx_count: u32,
}Expand description
A chain-agnostic block summary.
Contains only the fields that every blockchain provides. Individual chain clients may expose richer block types through chain-specific methods.
Fields§
§height: u64Block height / slot / checkpoint number.
hash: StringBlock hash (hex string, chain-specific format).
parent_hash: StringParent block hash.
timestamp: i64Block timestamp (Unix seconds).
tx_count: u32Number of transactions in the block.
Trait Implementations§
Source§impl Clone for ChainBlock
impl Clone for ChainBlock
Source§fn clone(&self) -> ChainBlock
fn clone(&self) -> ChainBlock
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 ChainBlock
impl Debug for ChainBlock
Source§impl<'de> Deserialize<'de> for ChainBlock
impl<'de> Deserialize<'de> for ChainBlock
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
Auto Trait Implementations§
impl Freeze for ChainBlock
impl RefUnwindSafe for ChainBlock
impl Send for ChainBlock
impl Sync for ChainBlock
impl Unpin for ChainBlock
impl UnsafeUnpin for ChainBlock
impl UnwindSafe for ChainBlock
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