FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TypeIdentity

    struct · ferroui-base · v0.5.0

    struct TypeIdentity
    

    The identity of a class: what a type check (is::<T>(), cast::<T>(), downcast_ref::<T>()) compares. One static per class, made by ferro_class!; the TypeInfo of the class points to it.

    A type check names only this, not the TypeInfo of the class, whose initialisation, constructor and markup metadata the linker then keeps only when something uses them: checking whether an object is a RichTextBlock does not link the rich text block into an application that never creates one (#612).

    View source

    Members

    new

    const fn new(name: &'static str) -> Self
    

    The identity of the class name. Each class has its own static of this type; two identities are the same only if they are the same static.

    Source

    name

    const fn name(self: &Self) -> &'static str
    

    The name of the class, for diagnostics.

    Source

    Trait implementations

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

    Availability

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