FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ModelTypes

    struct · ferroui-base · v0.5.0

    struct ModelTypes
    

    The per-thread table of model type metadata.

    View source

    Members

    register

    fn register<T: PartialEq + 'static>(describe: impl FnOnce(ModelTypeBuilder<T>) -> ModelTypeBuilder<T>)
    

    Registers (or replaces) the metadata of T.

    Source

    register_notifying_collection

    fn register_notifying_collection<T: INotifyCollectionChanged + PartialEq + 'static>()
    

    Registers a collection type whose only metadata is its change notifications: a collection held by value as a handle (an instantiation of the notifying list that a typed list declaration names). An indexer of a binding path over such a collection follows its changes. Unlike register it does not make the type a reference type: its values are handles.

    Source

    is_registered

    fn is_registered(id: TypeId) -> bool
    

    Source

    find

    fn find(value: &dyn AnyValue) -> Option<Rc<ModelType>>
    

    The metadata of the type of value, if it was registered.

    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

    Availability

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