NotifyPropertyChangedEx
trait · ferroui-dynamic-data · v0.5.0
trait NotifyPropertyChangedEx: Clone + 'static
The observation of the properties of an object that raises PropertyChanged
(NotifyPropertyChangedEx), implemented for the objects held in Rc (upstream's classes).
The paths are PropertyPaths from prop!,
or PropertyChains when a step may be null. Upstream's optional
parameters become methods of their own: _with takes notify_on_initial_value, and
_with_fallback the fallback value too.
Members
when_any_property_changedwhen_property_changedwhen_property_changed_withwhen_property_changed_with_fallbackwhen_value_changedwhen_value_changed_withwhen_value_changed_with_fallbackwhen_changedwhen_changed_withwhen_changed2when_changed2_withwhen_changed3when_changed3_withwhen_changed4when_changed4_withwhen_changed5when_changed5_withwhen_changed6when_changed6_with
when_any_property_changed
fn when_any_property_changed(self: &Self, properties_to_monitor: &[&str]) -> Rc<dyn IObservable<Self>>
The object, whenever one of properties_to_monitor changes, or any property when none is
given (WhenAnyPropertyChanged(params string[] propertiesToMonitor)).
when_property_changed
fn when_property_changed<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P) -> Rc<dyn IObservable<PropertyValue<Self, <P as >::Value>>>
where <P as >::Value: 'static
The changes of the property of property_accessor, as the object with the value, the
current value first; nothing while a null step interrupts the path
(WhenPropertyChanged(Expression<Func<TObject, TProperty>>, bool notifyOnInitialValue = true)).
when_property_changed_with
fn when_property_changed_with<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P, notify_on_initial_value: bool) -> Rc<dyn IObservable<PropertyValue<Self, <P as >::Value>>>
where <P as >::Value: 'static
when_property_changed that starts with the current value
only when notify_on_initial_value is true
(WhenPropertyChanged(Expression<Func<TObject, TProperty>>, bool notifyOnInitialValue)).
when_property_changed_with_fallback
fn when_property_changed_with_fallback<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P, notify_on_initial_value: bool, _fallback_value: impl Fn() -> <P as >::Value + 'static) -> Rc<dyn IObservable<PropertyValue<Self, <P as >::Value>>>
where <P as >::Value: 'static
when_property_changed_with with a fallback value: the
values that a null step interrupts pass too, without a value
(WhenPropertyChanged(Expression<Func<TObject, TProperty>>, bool, Func<TProperty?>? fallbackValue)).
As upstream, the fallback is not called: its presence lets the unobtainable values through.
when_value_changed
fn when_value_changed<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P) -> Rc<dyn IObservable<<P as >::Value>>
where <P as >::Value: 'static
The values of the property of property_accessor, the current value first; nothing while a
null step interrupts the path
(WhenValueChanged(Expression<Func<TObject, TProperty>>, bool notifyOnInitialValue = true)).
when_value_changed_with
fn when_value_changed_with<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P, notify_on_initial_value: bool) -> Rc<dyn IObservable<<P as >::Value>>
where <P as >::Value: 'static
when_value_changed that starts with the current value only
when notify_on_initial_value is true
(WhenValueChanged(Expression<Func<TObject, TProperty>>, bool notifyOnInitialValue)).
when_value_changed_with_fallback
fn when_value_changed_with_fallback<P: IntoPropertyChain<Self>>(self: &Self, property_accessor: P, notify_on_initial_value: bool, fallback_value: impl Fn() -> <P as >::Value + 'static) -> Rc<dyn IObservable<<P as >::Value>>
where <P as >::Value: 'static
when_value_changed_with with fallback_value for the
values that a null step interrupts
(WhenValueChanged(Expression<Func<TObject, TProperty>>, bool, Func<TProperty>? fallbackValue)).
when_changed
fn when_changed<P1: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, result_selector: impl Fn(&Self, <P1 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static
The value of p1 with the object, through result_selector, the current one first
(WhenChanged(Expression<Func<TObject, TProperty1>>, Func<TObject, TProperty1?, TResult>)).
when_changed_with
fn when_changed_with<P1: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, result_selector: impl Fn(&Self, <P1 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static
when_changed with a fallback value for the values that a null step
interrupts, which are dropped without one
(WhenChanged(.., Func<TProperty1>? p1Fallback)).
when_changed2
fn when_changed2<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static
The latest values of p1 and p2 with the object, through result_selector, whenever one
changes (WhenChanged of two properties).
when_changed2_with
fn when_changed2_with<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>, p2_fallback: Fallback<<P2 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static
when_changed2 with fallback values (WhenChanged of two
properties, with p1Fallback and p2Fallback).
when_changed3
fn when_changed3<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static
The latest values of three properties with the object, through result_selector
(WhenChanged of three properties).
when_changed3_with
fn when_changed3_with<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>, p2_fallback: Fallback<<P2 as >::Value>, p3_fallback: Fallback<<P3 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static
when_changed3 with fallback values.
when_changed4
fn when_changed4<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static
The latest values of four properties with the object, through result_selector
(WhenChanged of four properties).
when_changed4_with
fn when_changed4_with<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>, p2_fallback: Fallback<<P2 as >::Value>, p3_fallback: Fallback<<P3 as >::Value>, p4_fallback: Fallback<<P4 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static
when_changed4 with fallback values.
when_changed5
fn when_changed5<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, P5: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value, <P5 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static,
<P5 as >::Value: Clone + 'static
The latest values of five properties with the object, through result_selector
(WhenChanged of five properties).
when_changed5_with
fn when_changed5_with<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, P5: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value, <P5 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>, p2_fallback: Fallback<<P2 as >::Value>, p3_fallback: Fallback<<P3 as >::Value>, p4_fallback: Fallback<<P4 as >::Value>, p5_fallback: Fallback<<P5 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static,
<P5 as >::Value: Clone + 'static
when_changed5 with fallback values.
when_changed6
fn when_changed6<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, P5: IntoPropertyChain<Self>, P6: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value, <P5 as >::Value, <P6 as >::Value) -> R + 'static) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static,
<P5 as >::Value: Clone + 'static,
<P6 as >::Value: Clone + 'static
The latest values of six properties with the object, through result_selector
(WhenChanged of six properties).
when_changed6_with
fn when_changed6_with<P1: IntoPropertyChain<Self>, P2: IntoPropertyChain<Self>, P3: IntoPropertyChain<Self>, P4: IntoPropertyChain<Self>, P5: IntoPropertyChain<Self>, P6: IntoPropertyChain<Self>, R: 'static>(self: &Self, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, result_selector: impl Fn(&Self, <P1 as >::Value, <P2 as >::Value, <P3 as >::Value, <P4 as >::Value, <P5 as >::Value, <P6 as >::Value) -> R + 'static, p1_fallback: Fallback<<P1 as >::Value>, p2_fallback: Fallback<<P2 as >::Value>, p3_fallback: Fallback<<P3 as >::Value>, p4_fallback: Fallback<<P4 as >::Value>, p5_fallback: Fallback<<P5 as >::Value>, p6_fallback: Fallback<<P6 as >::Value>) -> Rc<dyn IObservable<R>>
where <P1 as >::Value: Clone + 'static,
<P2 as >::Value: Clone + 'static,
<P3 as >::Value: Clone + 'static,
<P4 as >::Value: Clone + 'static,
<P5 as >::Value: Clone + 'static,
<P6 as >::Value: Clone + 'static
when_changed6 with fallback values.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.