Enum near_chain::Block[][src]

pub enum Block {
    BlockV1(Box<BlockV1, Global>),
    BlockV2(Box<BlockV2, Global>),
}
Expand description

Versioned Block data structure. For each next version, document what are the changes between versions.

Variants

BlockV1(Box<BlockV1, Global>)

Tuple Fields of BlockV1

0: Box<BlockV1, Global>
BlockV2(Box<BlockV2, Global>)

Tuple Fields of BlockV2

0: Box<BlockV2, Global>

Implementations

Returns genesis block for given genesis date and state root.

Produces new block from header of previous block, current state root and set of transactions.

Checks that block content matches block hash, with the possible exception of chunk signatures

This is not suppose to be used outside of chain tests, because this doesn’t refer to correct chunks. Done because chain tests don’t have a good way to store chunks right now.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more