pub struct CellHeader {
pub raw_size: i32,
}Expand description
Raw cell header — the first 4 bytes of every cell.
Cell size is a signed i32:
- Negative = allocated cell (use absolute value for size)
- Positive = free/unallocated cell
All cell sizes are 8-byte aligned.
Fields§
§raw_size: i32Raw size field (negative = allocated, positive = free).
Implementations§
Source§impl CellHeader
impl CellHeader
Sourcepub fn from_bytes(bytes: &[u8; 4]) -> Self
pub fn from_bytes(bytes: &[u8; 4]) -> Self
Parse cell header from 4 bytes.
Sourcepub fn is_allocated(&self) -> bool
pub fn is_allocated(&self) -> bool
Whether this cell is allocated.
Trait Implementations§
Source§impl Clone for CellHeader
impl Clone for CellHeader
Source§fn clone(&self) -> CellHeader
fn clone(&self) -> CellHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CellHeader
Auto Trait Implementations§
impl Freeze for CellHeader
impl RefUnwindSafe for CellHeader
impl Send for CellHeader
impl Sync for CellHeader
impl Unpin for CellHeader
impl UnsafeUnpin for CellHeader
impl UnwindSafe for CellHeader
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