Struct trie_db::NibbleVec [−][src]
pub struct NibbleVec { /* fields omitted */ }Expand description
Owning, nibble-oriented byte vector. Counterpart to NibbleSlice.
Nibbles are always left aligned, so making a NibbleVec from
a NibbleSlice can get costy.
Implementations
impl NibbleVec[src]
impl NibbleVec[src]pub fn drop_lasts(&mut self, n: usize)[src]
pub fn drop_lasts(&mut self, n: usize)[src]Remove then n last nibbles in a faster way than popping n times.
pub fn append(&mut self, v: &NibbleVec)[src]
pub fn append(&mut self, v: &NibbleVec)[src]Append another NibbleVec. Can be slow (alignement of second vec).
pub fn append_partial(&mut self, (start_byte, sl): Partial<'_>)[src]
pub fn append_partial(&mut self, (start_byte, sl): Partial<'_>)[src]Append a Partial. Can be slow (alignement of partial).
pub fn as_nibbleslice(&self) -> Option<NibbleSlice<'_>>[src]
pub fn as_nibbleslice(&self) -> Option<NibbleSlice<'_>>[src]Try to treat this NibbleVec as a NibbleSlice. Works only if there is no padding.
pub fn starts_with(&self, other: &Self) -> bool[src]
pub fn starts_with(&self, other: &Self) -> bool[src]Do we start with the same nibbles as the whole of them?
Trait Implementations
impl<'a> From<NibbleSlice<'a>> for NibbleVec[src]
impl<'a> From<NibbleSlice<'a>> for NibbleVec[src]fn from(s: NibbleSlice<'a>) -> Self[src]
fn from(s: NibbleSlice<'a>) -> Self[src]Performs the conversion.
impl Eq for NibbleVec[src]
impl StructuralEq for NibbleVec[src]
impl StructuralPartialEq for NibbleVec[src]
Auto Trait Implementations
impl RefUnwindSafe for NibbleVec
impl Send for NibbleVec
impl Sync for NibbleVec
impl Unpin for NibbleVec
impl UnwindSafe for NibbleVec
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> MaybeDebug for T where
T: Debug, [src]
T: Debug,