Struct trie_db::node::NibbleSlicePlan
source · pub struct NibbleSlicePlan { /* private fields */ }
Expand description
A NibbleSlicePlan
is a blueprint for decoding a nibble slice from a byte slice. The
NibbleSlicePlan
is created by parsing a byte slice and can be reused multiple times.
Implementations§
source§impl NibbleSlicePlan
impl NibbleSlicePlan
sourcepub fn build<'a, 'b>(&'a self, data: &'b [u8]) -> NibbleSlice<'b>
pub fn build<'a, 'b>(&'a self, data: &'b [u8]) -> NibbleSlice<'b>
Build a nibble slice by decoding a byte slice according to the plan. It is the responsibility of the caller to ensure that the node plan was created for the argument data, otherwise the call may decode incorrectly or panic.
Trait Implementations§
source§impl Clone for NibbleSlicePlan
impl Clone for NibbleSlicePlan
source§fn clone(&self) -> NibbleSlicePlan
fn clone(&self) -> NibbleSlicePlan
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NibbleSlicePlan
impl Debug for NibbleSlicePlan
source§impl PartialEq for NibbleSlicePlan
impl PartialEq for NibbleSlicePlan
source§fn eq(&self, other: &NibbleSlicePlan) -> bool
fn eq(&self, other: &NibbleSlicePlan) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for NibbleSlicePlan
impl StructuralPartialEq for NibbleSlicePlan
Auto Trait Implementations§
impl Freeze for NibbleSlicePlan
impl RefUnwindSafe for NibbleSlicePlan
impl Send for NibbleSlicePlan
impl Sync for NibbleSlicePlan
impl Unpin for NibbleSlicePlan
impl UnwindSafe for NibbleSlicePlan
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