FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReactiveUIBindingExtensions

    trait · ferroui-reactiveui · v0.5.0

    trait ReactiveUIBindingExtensions<T: 'static>
    

    The observation of the properties of an object (ReactiveUIBindingExtensions: WhenAnyValue, WhenAny, WhenAnyObservable, WhenChanged, WhenChanging); implemented for every Rc<T>, so that vm.when_any_value(prop!(VM => name)) works.

    The paths are one argument: one PropertyPath or a tuple of 2 to 16 (WhenAnyPaths). The observation holds the object weakly.

    View source

    Members

    when_any_value

    fn when_any_value<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
    

    The latest values of paths: the current values on subscription, then the values after each change of any step of any path, skipping repeats (WhenAnyValue). The values of a tuple of paths are a tuple (upstream's PropertyValues<T1, ..., Tn>).

    Source

    when_any_value_select

    fn when_any_value_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
    

    when_any_value projected by selector, which takes the values as one value or one tuple (WhenAnyValue(..., Func<T1, ..., TRet>)).

    Source

    when_any

    fn when_any<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Changes) -> R + 'static) -> Rc<dyn IObservable<R>>
    

    The latest changes of paths projected by selector, which takes the changes (with their senders and paths) as one change or one tuple (WhenAny).

    Source

    when_any_observable

    fn when_any_observable<P: WhenAnyObservablePaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Item>>
    

    The values of the latest observable that each of paths holds, merged (WhenAnyObservable); a path may hold Rc<dyn IObservable<R>> or an Option of it.

    Source

    when_any_observable_select

    fn when_any_observable_select<P: WhenAnyObservableCombinePaths<T>, R: 'static>(self: &Self, paths: P, selector: impl Fn(<P as >::Items) -> R + 'static) -> Rc<dyn IObservable<R>>
    

    The latest values of the latest observable that each of paths holds, combined by selector, which takes them as one tuple (WhenAnyObservable(..., Func<T1?, ..., TRet>)).

    Source

    when_changed

    fn when_changed<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
    

    The latest values of paths after each change, starting with the current values and skipping repeats (WhenChanged).

    Source

    when_changed_select

    fn when_changed_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, conversion: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
    

    when_changed converted by conversion (WhenChanged(..., Func<T1, ..., TReturn>)).

    Source

    when_changing

    fn when_changing<P: WhenAnyPaths<T>>(self: &Self, paths: P) -> Rc<dyn IObservable<<P as >::Values>>
    

    The latest values of paths before each change, starting with the current values (WhenChanging); for a path of one property each notification is reported, even with the value of the last one (a deeper path drops repeats).

    Source

    when_changing_select

    fn when_changing_select<P: WhenAnyPaths<T>, R: 'static>(self: &Self, paths: P, conversion: impl Fn(<P as >::Values) -> R + 'static) -> Rc<dyn IObservable<R>>
    

    when_changing converted by conversion (WhenChanging(..., Func<T1, ..., TReturn>)).

    Source

    Trait implementations

    Availability

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