Struct diem_types::block_metadata::BlockMetadata[][src]

pub struct BlockMetadata { /* fields omitted */ }
Expand description

Struct that will be persisted on chain to store the information of the current block.

The flow will look like following:

  1. The executor will pass this struct to VM at the end of a block proposal.
  2. The VM will use this struct to create a special system transaction that will emit an event represents the information of the current block. This transaction can’t be emitted by regular users and is generated by each of the validators on the fly. Such transaction will be executed before all of the user-submitted transactions in the blocks.
  3. Once that special resource is modified, the other user transactions can read the consensus info by calling into the read method of that resource, which would thus give users the information such as the current leader.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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.

Performs the conversion.

Should always be Self

Generates a hash used only for tests.

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.