pub struct Block {
pub parent_hash: Option<[u8; 32]>,
pub transaction: Transaction,
pub timestamp: Timestamp,
}Expand description
A single record in the ledger.
Fields§
§parent_hash: Option<[u8; 32]>The hash of the parent block.
transaction: TransactionThe transaction that occurred in this block.
timestamp: TimestampThe time at which the ledger constructed the block.
Trait Implementations§
Source§impl CandidType for Block
impl CandidType for Block
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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