[][src]Struct snarkos_objects::block::Block

pub struct Block<T: Transaction> {
    pub header: BlockHeader,
    pub transactions: DPCTransactions<T>,
}

Fields

header: BlockHeader

First HEADER_SIZE bytes of the block as defined by the encoding used by "block" messages.

transactions: DPCTransactions<T>

The block transactions.

Implementations

impl<T: Transaction> Block<T>[src]

pub fn serialize(&self) -> Result<Vec<u8>, BlockError>[src]

pub fn deserialize(bytes: &Vec<u8>) -> Result<Self, BlockError>[src]

Trait Implementations

impl<T: Transaction> BlockScheme for Block<T>[src]

type BlockHeader = BlockHeader

type Transaction = T

fn header(&self) -> &Self::BlockHeader[src]

Returns the header.

fn transactions(&self) -> &[Self::Transaction][src]

Returns the transactions.

impl<T: Clone + Transaction> Clone for Block<T>[src]

impl<T: Debug + Transaction> Debug for Block<T>[src]

impl<T: Eq + Transaction> Eq for Block<T>[src]

impl<T: Transaction> FromBytes for Block<T>[src]

impl<T: PartialEq + Transaction> PartialEq<Block<T>> for Block<T>[src]

impl<T: Transaction> StructuralEq for Block<T>[src]

impl<T: Transaction> StructuralPartialEq for Block<T>[src]

impl<T: Transaction> ToBytes for Block<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Block<T> where
    T: RefUnwindSafe

impl<T> Send for Block<T> where
    T: Send

impl<T> Sync for Block<T> where
    T: Sync

impl<T> Unpin for Block<T> where
    T: Unpin

impl<T> UnwindSafe for Block<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,