FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ICreatesObservableForProperty

    trait · ferroui-reactiveui · v0.5.0

    trait ICreatesObservableForProperty
    

    Provides the change notifications of the properties of the objects it supports; of the implementations registered in AppLocator, the one with the highest affinity for an object and a property is the one used (ICreatesObservableForProperty).

    The object is a PropertyOwner: the object that owns the property, type-erased, with its PropertyChanged notification when it has one. It is what one step of a PropertyPath gives (PathStep::owner).

    View source

    Members

    get_affinity_for_object

    fn get_affinity_for_object(self: &Self, owner: &PropertyOwner, property_name: &str, before_changed: bool) -> i32
    

    How well this implementation can observe property_name of owner: a positive score when it can, where a higher score wins; zero or negative when it cannot (GetAffinityForObject).

    Source

    get_notification_for_property

    fn get_notification_for_property(self: &Self, owner: &PropertyOwner, property_name: &str, before_changed: bool, suppress_warnings: bool) -> Rc<dyn IObservable<ObservedChange<PropertyOwner, ()>>>
    

    A sequence that produces a change each time property_name of owner changes, or is about to change when before_changed is set (GetNotificationForProperty). The changes carry no value: the caller reads the current value from the object. suppress_warnings skips the warning written for a property that cannot notify.

    Source

    Trait implementations

    Availability

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