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 more