pub struct CellBuilder<C: CellFamily> { /* private fields */ }
Expand description

Builder for constructing cells with densely packed data.

Implementations§

Creates an empty cell builder.

Computes the cell level from the level mask.

Returns the data size of this cell in bits.

Returns remaining data capacity in bits.

Returns remaining references capacity.

Explicitly sets the level mask and marks this cell as exotic.

Explicitly sets the level mask and marks this cell as exotic.

Tries to store the specified number of zero bits in the cell, returning false if there is not enough remaining capacity.

Tries to store one zero bit in the cell, returning false if there is not enough remaining capacity.

Tries to store one non-zero bit in the cell, returning false if there is not enough remaining capacity.

Tries to store u8 in the cell, returning false if there is not enough remaining capacity.

Tries to store u16 in the cell, returning false if there is not enough remaining capacity.

Tries to store u32 in the cell, returning false if there is not enough remaining capacity.

Tries to store u64 in the cell, returning false if there is not enough remaining capacity.

Tries to store u128 in the cell, returning false if there is not enough remaining capacity.

Tries to store 32 bytes in the cell, returning false if there is not enough remaining capacity.

Tries to store u8 in the cell (but only the specified number of bits), returning false if there is not enough remaining capacity.

NOTE: if bits is greater than 8, pads the value with zeros (as high bits).

Tries to store u64 in the cell (but only the specified number of bits), returning false if there is not enough remaining capacity.

NOTE: if bits is greater than 64, pads the value with zeros (as high bits).

Returns a slice of the child cells stored in the builder.

Tries to store a child in the cell, returning false if there is not enough remaining capacity.

Tries to build a new cell using the default finalizer.

See Finalizer

Tries to build a new cell using the specified finalizer.

Trait Implementations§

Returns the “default value” for a type. 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 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.