TypeTable
struct · ferroui-static-view-locator · v0.5.0
struct TypeTable<V: Copy + Send + Sync + 'static>
A table of values by type (Dictionary<Type, V> of the generated source), declared as a
static of constant entries and indexed on its first lookup. Of two entries of one type the
first is the value.
Members
new
const fn new(entries: &'static [TypeEntry<V>]) -> Self
The table of entries.
get
fn get(self: &Self, type_id: TypeId) -> Option<V>
The value of the type type_id (TryGetValue).
contains
fn contains(self: &Self, type_id: TypeId) -> bool
Whether the table has a value for the type type_id (ContainsKey).
entries
fn entries(self: &Self) -> &'static [TypeEntry<V>]
The entries, in the order of the generated source.
len
fn len(self: &Self) -> usize
The number of types of the table (Count).
is_empty
fn is_empty(self: &Self) -> bool
Whether the table has no type.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.