#[repr(C)]
pub struct CellDescriptor { pub d1: u8, pub d2: u8, }
Expand description

Tightly packed info about a cell.

Fields§

§d1: u8

First descriptor byte with a generic info about cell.

§d2: u8

Second descriptor byte with a packed data size.

Implementations§

Bit mask to store the number of references in the descriptor.

Bit mask to store the is_exotic flag in the descriptor.

Bit mask to store the store_hashes flag in the descriptor.

de Brujn level presence mask in the descriptor.

Computes d1 descriptor byte from parts

Computes d2 descriptor byte from cell length in bits

Constructs cell descriptor from descriptor bytes.

Computes cell type.

Computes child cell count.

Computes hash count.

NOTE: Guaranteed to be in range 1..=4.

Returns whether the cell is not Ordinary.

Returns whether this cell is a pruned branch cell

Returns whether this cell type is Merkle proof or Merkle update.

Returns whether this cell refers to some external data.

Returns whether this cell should store hashes in data.

Computes level mask.

Returns whether this cell’s data is 8-bit aligned.

Returns this cell’s data length in bytes.

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
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.