Expand description
The model layer: what bindings need from data that is not part of the class hierarchy (view models, plain data, collections, commands).
The managed runtime discovers these capabilities through reflection and
interface casts on arbitrary objects. Here a model type states them once:
it implements the notification traits it supports and declares its
bindable properties and methods (see ferro_model!
and ModelTypeBuilder). Compiled bindings do not need the declaration:
they are built from typed accessor closures.
Re-exports§
pub use crate::input::ICommand;
Structs§
- Bindable
Array - An array that bindings can index into: one or more dimensions of fixed lengths, stored in row-major order.
- Bindable
Dictionary - A notifying dictionary that bindings can index into (
Items[key]): aFerroDictionarytogether with the untyped change event that binding indexers subscribe to. - Bindable
List - A notifying list that bindings can index into: a
FerroListtogether with the untyped change event that binding indexers subscribe to. - Collection
Change - An untyped description of a change to a collection, as seen by bindings with an indexer in their path.
- Event
- A multicast event of a model object: the equivalent of a managed
eventmember on a type that is not part of the class hierarchy. - Model
Method - A method of a model type that bindings can turn into a command.
- Model
Type - 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.
- Model
Type Builder - Declares the binding metadata of model type
T. - Model
Types - The per-thread table of model type metadata.
Traits§
- IBindable
Array - Untyped access to an array: a fixed-size collection accessed with integer indexes, one per dimension.
- IBindable
Indexer - The untyped form of an indexer (
this[..]), for bindings with an indexer in their path (Items[key],Grid[1,2]). - IBindable
List - Untyped indexed access to a list, for bindings with an indexer in their
path (
Items[2]). - INotify
Collection Changed - Notifies clients of changes to a collection, such as when items are added and removed or the whole collection is reset.
- INotify
Data Error Info - Lets a model object report validation errors for its properties (synchronously or asynchronously).
- INotify
Property Changed - Notifies clients that a property value of a model object (an object that is not part of the class hierarchy, such as a view model) has changed.
- Model
- A model type that declares its binding metadata.