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.
Members
value_typepropertiesfind_propertyfind_methodas_notify_property_changedas_notify_data_error_infoas_listas_indexeras_arrayas_notify_collection_changed
value_type
fn value_type(self: &Self) -> ValueType
properties
fn properties(self: &Self) -> &[Rc<dyn IPropertyInfo>]
The declared properties.
find_property
fn find_property(self: &Self, name: &str) -> Option<Rc<dyn IPropertyInfo>>
Finds a declared property by name.
find_method
fn find_method(self: &Self, name: &str) -> Option<Rc<ModelMethod>>
Finds a declared method by name.
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.
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.
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.
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.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.