Struct qp_trie::SubTrie

source ·
pub struct SubTrie<'a, K: 'a, V: 'a> { /* private fields */ }

Implementations§

source§

impl<'a, K: 'a, V: 'a> SubTrie<'a, K, V>

source

pub fn is_empty(&self) -> bool

Returns true if the subtrie has no entries.

source§

impl<'a, K: Borrow<[u8]>, V> SubTrie<'a, K, V>

source

pub fn iter(&self) -> Iter<'a, K, V>

source

pub fn iter_prefix<L: Borrow<[u8]>>(&self, prefix: L) -> Iter<'a, K, V>

source

pub fn subtrie<L: Borrow<[u8]>>(&self, prefix: L) -> SubTrie<'a, K, V>

source

pub fn get<L: Borrow<[u8]>>(&self, key: L) -> Option<&'a V>

Trait Implementations§

source§

impl<'a, K: Debug, V: Debug> Debug for SubTrie<'a, K, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, K: Borrow<[u8]>, V, L: Borrow<[u8]>> Index<L> for SubTrie<'a, K, V>

§

type Output = V

The returned type after indexing.
source§

fn index(&self, key: L) -> &V

Performs the indexing (container[index]) operation. Read more
source§

impl<'a, K: 'a, V: 'a> IntoIterator for SubTrie<'a, K, V>

§

type IntoIter = Iter<'a, K, V>

Which kind of iterator are we turning this into?
§

type Item = (&'a K, &'a V)

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<'a, K, V> RefUnwindSafe for SubTrie<'a, K, V>where K: RefUnwindSafe, V: RefUnwindSafe,

§

impl<'a, K, V> Send for SubTrie<'a, K, V>where K: Sync, V: Sync,

§

impl<'a, K, V> Sync for SubTrie<'a, K, V>where K: Sync, V: Sync,

§

impl<'a, K, V> Unpin for SubTrie<'a, K, V>

§

impl<'a, K, V> UnwindSafe for SubTrie<'a, K, V>where K: RefUnwindSafe, V: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.