Struct everscale_types::boc::ser::BocHeader
source · pub struct BocHeader<'a, S = RandomState> { /* private fields */ }Expand description
Intermediate BOC serializer state.
Implementations§
source§impl<'a, S> BocHeader<'a, S>where
S: BuildHasher + Default,
impl<'a, S> BocHeader<'a, S>where
S: BuildHasher + Default,
sourcepub fn with_root(root: &'a DynCell) -> Self
pub fn with_root(root: &'a DynCell) -> Self
Creates an intermediate BOC serializer state with a single root.
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty intermediate BOC serializer state. Reserves space for the specified number of cells.
sourcepub fn with_capacity_and_root(capacity: usize, root: &'a DynCell) -> Self
pub fn with_capacity_and_root(capacity: usize, root: &'a DynCell) -> Self
Creates an intermediate BOC serializer state with a single root. Reserves space for the specified number of cells.
source§impl<'a, S> BocHeader<'a, S>where
S: BuildHasher,
impl<'a, S> BocHeader<'a, S>where
S: BuildHasher,
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears the header, removing all cells. Keeps the allocated memory for reuse.
sourcepub fn without_hashes(self, without_hashes: bool) -> Self
pub fn without_hashes(self, without_hashes: bool) -> Self
Prevents hashes from being stored in the encoded BOC.
(overwrites descriptor flag store_hashes during serialization).
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for BocHeader<'a, S>where
S: Freeze,
impl<'a, S = RandomState> !RefUnwindSafe for BocHeader<'a, S>
impl<'a, S> Send for BocHeader<'a, S>where
S: Send,
impl<'a, S> Sync for BocHeader<'a, S>where
S: Sync,
impl<'a, S> Unpin for BocHeader<'a, S>where
S: Unpin,
impl<'a, S = RandomState> !UnwindSafe for BocHeader<'a, S>
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