Struct anise::structure::lookuptable::LookUpTable
source · pub struct LookUpTable<const ENTRIES: usize> {
pub by_id: FnvIndexMap<i32, Entry, ENTRIES>,
pub by_name: FnvIndexMap<String<32>, Entry, ENTRIES>,
}
Expand description
Fields§
§by_id: FnvIndexMap<i32, Entry, ENTRIES>
Unique IDs of each item in the
by_name: FnvIndexMap<String<32>, Entry, ENTRIES>
Corresponding index for each hash
Implementations§
source§impl<const ENTRIES: usize> LookUpTable<ENTRIES>
impl<const ENTRIES: usize> LookUpTable<ENTRIES>
Trait Implementations§
source§impl<const ENTRIES: usize> Clone for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Clone for LookUpTable<ENTRIES>
source§fn clone(&self) -> LookUpTable<ENTRIES>
fn clone(&self) -> LookUpTable<ENTRIES>
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<const ENTRIES: usize> Debug for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Debug for LookUpTable<ENTRIES>
source§impl<'a, const ENTRIES: usize> Decode<'a> for LookUpTable<ENTRIES>
impl<'a, const ENTRIES: usize> Decode<'a> for LookUpTable<ENTRIES>
source§impl<const ENTRIES: usize> Default for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Default for LookUpTable<ENTRIES>
source§fn default() -> LookUpTable<ENTRIES>
fn default() -> LookUpTable<ENTRIES>
Returns the “default value” for a type. Read more
source§impl<const ENTRIES: usize> Encode for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Encode for LookUpTable<ENTRIES>
source§fn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, encoder: &mut impl Writer) -> Result<()>
fn encode(&self, encoder: &mut impl Writer) -> Result<()>
Encode this value as ASN.1 DER using the provided
Writer
.source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
source§impl<const ENTRIES: usize> PartialEq for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> PartialEq for LookUpTable<ENTRIES>
source§fn eq(&self, other: &LookUpTable<ENTRIES>) -> bool
fn eq(&self, other: &LookUpTable<ENTRIES>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<const ENTRIES: usize> Eq for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> StructuralPartialEq for LookUpTable<ENTRIES>
Auto Trait Implementations§
impl<const ENTRIES: usize> Freeze for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> RefUnwindSafe for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Send for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Sync for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> Unpin for LookUpTable<ENTRIES>
impl<const ENTRIES: usize> UnwindSafe for LookUpTable<ENTRIES>
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
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.