pub struct Layer<K, L, O = usize>{ /* private fields */ }Expand description
A level of the trie, with keys and offsets into a lower layer.
In this representation, the values for keys[i] are found at vals[offs[i] .. offs[i+1]].
Implementations§
Trait Implementations§
Source§impl<K, L, O> AddAssignByRef for Layer<K, L, O>
impl<K, L, O> AddAssignByRef for Layer<K, L, O>
fn add_assign_by_ref(&mut self, other: &Self)
Source§impl<K, L, O> Archive for Layer<K, L, O>
impl<K, L, O> Archive for Layer<K, L, O>
Source§impl<K, L, O> NumEntries for Layer<K, L, O>
impl<K, L, O> NumEntries for Layer<K, L, O>
Source§const CONST_NUM_ENTRIES: Option<usize> = None
const CONST_NUM_ENTRIES: Option<usize> = None
Returns
Some(n) if Self has constant size or None otherwise.Source§fn num_entries_shallow(&self) -> usize
fn num_entries_shallow(&self) -> usize
Returns the number of entries in
self.Source§fn num_entries_deep(&self) -> usize
fn num_entries_deep(&self) -> usize
Recursively computes the number of entries in a container by
calling this method on each entry in
self. Read moreSource§impl<K, L, O> SizeOf for Layer<K, L, O>
impl<K, L, O> SizeOf for Layer<K, L, O>
Source§fn size_of_children(&self, context: &mut Context)
fn size_of_children(&self, context: &mut Context)
Gets the size of all “children” owned by this value, not including the
size of the value itself. Read more
Source§fn size_of_with_context(&self, context: &mut Context)
fn size_of_with_context(&self, context: &mut Context)
Adds the size of the current value to the given
Context,
including both the size of the value itself and all of its childrenSource§impl<K, L, O> Trie for Layer<K, L, O>
impl<K, L, O> Trie for Layer<K, L, O>
Source§type Item<'a> = (&'a mut K, <L as Trie>::Item<'a>)
type Item<'a> = (&'a mut K, <L as Trie>::Item<'a>)
The type of item from which the type is constructed.
type ItemRef<'a> = (&'a K, <L as Trie>::ItemRef<'a>)
type Factories = LayerFactories<K, <L as Trie>::Factories>
Source§type Cursor<'s> = LayerCursor<'s, K, L, O>
where
K: 's,
O: 's,
L: 's
type Cursor<'s> = LayerCursor<'s, K, L, O> where K: 's, O: 's, L: 's
The type of cursor used to navigate the type.
Source§type MergeBuilder = LayerBuilder<K, <L as Trie>::MergeBuilder, O>
type MergeBuilder = LayerBuilder<K, <L as Trie>::MergeBuilder, O>
The type used to merge instances of the type together.
Source§type TupleBuilder = LayerBuilder<K, <L as Trie>::TupleBuilder, O>
type TupleBuilder = LayerBuilder<K, <L as Trie>::TupleBuilder, O>
The type used to assemble instances of the type from its
Items.Source§fn keys(&self) -> usize
fn keys(&self) -> usize
The number of distinct keys, as distinct from the total number of
tuples.
Source§fn cursor_from(&self, lower: usize, upper: usize) -> Self::Cursor<'_>
fn cursor_from(&self, lower: usize, upper: usize) -> Self::Cursor<'_>
Returns a cursor over a range of data, commonly used by others to
restrict navigation to sub-collections.
Source§fn approximate_byte_size(&self) -> usize
fn approximate_byte_size(&self) -> usize
Compute an approximate byte size of the collection.
impl<K, L, O> Eq for Layer<K, L, O>
Auto Trait Implementations§
impl<K, L, O> Freeze for Layer<K, L, O>
impl<K, L, O = usize> !RefUnwindSafe for Layer<K, L, O>
impl<K, L, O> Send for Layer<K, L, O>
impl<K, L, O> Sync for Layer<K, L, O>
impl<K, L, O> Unpin for Layer<K, L, O>
impl<K, L, O = usize> !UnwindSafe for Layer<K, L, O>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.