pub struct Block {
pub header: BlockHeader,
pub transactions: Box<[Transaction]>,
}Expand description
Block: ℬ = ℋ × 𝒯𝒳*
Performance optimization: Uses Box<Transaction> instead of Vec
Fields§
§header: BlockHeader§transactions: Box<[Transaction]>Implementations§
Source§impl Block
impl Block
Sourcepub fn from_parts(header: BlockHeader, transactions: Box<[Transaction]>) -> Self
pub fn from_parts(header: BlockHeader, transactions: Box<[Transaction]>) -> Self
Wire-decode / explicit construction. Counts as live (M-2: serde-only
hooks missed deserialize_block_with_witnesses, which uses this path).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
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 UnsafeUnpin 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