pub struct CellParts<'a> {
pub stats: CellTreeStats,
pub bit_len: u16,
pub descriptor: CellDescriptor,
pub children_mask: LevelMask,
pub references: ArrayVec<Cell, MAX_REF_COUNT>,
pub data: &'a [u8],
}Expand description
Partially assembled cell.
Fields§
§stats: CellTreeStatsCell tree storage stats.
bit_len: u16Length of this cell’s data in bits.
descriptor: CellDescriptorWell-formed cell descriptor.
children_mask: LevelMaskBitwise OR of child level masks.
references: ArrayVec<Cell, MAX_REF_COUNT>Array of child cells.
NOTE: it is guaranteed that the length of the array is consistent with the descriptor.
data: &'a [u8]Cell data slice.
Implementations§
Source§impl<'a> CellParts<'a>
impl<'a> CellParts<'a>
Sourcepub unsafe fn from_raw_cell(
raw_cell: &'a [u8],
cells: &[Cell],
cell_count: u32,
ref_size: usize,
) -> Result<Self, Error>
pub unsafe fn from_raw_cell( raw_cell: &'a [u8], cells: &[Cell], cell_count: u32, ref_size: usize, ) -> Result<Self, Error>
Reads cell parts from the raw cell slice.
§Safety
The following must be true:
bytesmust be a correct bytes representation of cell.
NOTE: It is safe to use an unmodified output from CellParts::read_raw_cell.
Auto Trait Implementations§
impl<'a> Freeze for CellParts<'a>
impl<'a> !RefUnwindSafe for CellParts<'a>
impl<'a> Send for CellParts<'a>
impl<'a> Sync for CellParts<'a>
impl<'a> Unpin for CellParts<'a>
impl<'a> !UnwindSafe for CellParts<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more