FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    const fn new(entries: &'static [TypeEntry<V>]) -> Self
    

    The table of entries.

    Source

    get

    fn get(self: &Self, type_id: TypeId) -> Option<V>
    

    The value of the type type_id (TryGetValue).

    Source

    contains

    fn contains(self: &Self, type_id: TypeId) -> bool
    

    Whether the table has a value for the type type_id (ContainsKey).

    Source

    entries

    fn entries(self: &Self) -> &'static [TypeEntry<V>]
    

    The entries, in the order of the generated source.

    Source

    len

    fn len(self: &Self) -> usize
    

    The number of types of the table (Count).

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Whether the table has no type.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Debug

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.