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

Builder for constructing cells with densely packed data.

Implementations§

Creates an empty cell builder.

Tries to create a cell builder with the specified data.

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

Returns the data size of this cell in bits.

Returns remaining data capacity in bits.

Returns remaining references capacity.

Returns true if there is enough remaining capacity to fit bits and refs.

Explicitly sets the level mask.

Explicitly sets the level mask.

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 one 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).

Tries to store bytes 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 bytes * 8, pads the value with zeros (as high bits).

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

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

Tries to prepend bytes to the cell data (but only the specified number of bits), returning false if there is not enough capacity.

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

Computes the cell level from the level mask.

Computes the cell level mask from children.

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.

Sets children of the cell.

Tries to append a builder (its data and references), returning false if there is not enough remaining capacity.

Tries to append a cell slice (its data and references), returning false if there is not enough remaining capacity.

Tries to build a new cell using the specified finalizer.

Tries to build a new cell using the default finalizer.

See default_finalizer

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
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 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.