FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ModelType

    struct · ferroui-base · v0.5.0

    struct ModelType
    

    The binding metadata of a model type: a type outside the class hierarchy (typically a view model) that bindings with a string path can navigate.

    This is what stands in for reflection: the properties and methods a type declares by name, and how to reach the notification interfaces it implements from an untyped value.

    View source

    Members

    value_type

    fn value_type(self: &Self) -> ValueType
    

    Source

    properties

    fn properties(self: &Self) -> &[Rc<dyn IPropertyInfo>]
    

    The declared properties.

    Source

    find_property

    fn find_property(self: &Self, name: &str) -> Option<Rc<dyn IPropertyInfo>>
    

    Finds a declared property by name.

    Source

    find_method

    fn find_method(self: &Self, name: &str) -> Option<Rc<ModelMethod>>
    

    Finds a declared method by name.

    Source

    as_notify_property_changed

    fn as_notify_property_changed<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn INotifyPropertyChanged>
    

    The property change notifications of value, if its type declared them.

    Source

    as_notify_data_error_info

    fn as_notify_data_error_info<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn INotifyDataErrorInfo>
    

    The validation error notifications of value, if its type declared them.

    Source

    as_list

    fn as_list<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn IBindableList>
    

    Indexed access to value, if its type declared itself a list.

    Source

    as_indexer

    fn as_indexer<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn IBindableIndexer>
    

    The indexer of value, if its type declared one.

    Source

    as_array

    fn as_array<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn IBindableArray>
    

    Array access to value, if its type declared itself an array.

    Source

    as_notify_collection_changed

    fn as_notify_collection_changed<'a>(self: &Self, value: &'a dyn AnyValue) -> Option<&'a dyn INotifyCollectionChanged>
    

    The collection change notifications of value, if its type declared them or is a notifying list.

    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.