IReactiveObjectExt
trait · ferroui-reactiveui · v0.5.0
trait IReactiveObjectExt: IReactiveObject
The extension methods of every reactive object (IReactiveObjectExtensions), implemented for
every T: IReactiveObject.
The raising of a single change, raise_property_changing
and raise_property_changed, are methods of
IReactiveObject itself.
Members
raise_and_set_if_changedraise_and_set_if_changed_cellsubscribe_property_changing_eventssubscribe_property_changed_eventssuppress_change_notificationsare_change_notifications_enableddelay_change_notificationsare_change_notifications_delayed
raise_and_set_if_changed
fn raise_and_set_if_changed<V: PartialEq>(self: &Self, field: &impl BackingField<V>, value: V, property_name: &str) -> bool
The setter of a notifying property (RaiseAndSetIfChanged): unless field already holds
a value equal to value, raises the changing notifications of property_name, stores the
value, and raises the changed notifications. The field is a RefCell, or a Cell of a
Copy value.
Deviation (DEVIATIONS.md, ReactiveUI): it returns whether the value changed, where upstream
returns the value; the property name is given, where upstream takes the name of the caller
([CallerMemberName]).
raise_and_set_if_changed_cell
fn raise_and_set_if_changed_cell<V: Copy + PartialEq>(self: &Self, field: &Cell<V>, value: V, property_name: &str) -> bool
raise_and_set_if_changed for a Cell field.
subscribe_property_changing_events
fn subscribe_property_changing_events(self: &Self)
Makes changes raise the PropertyChanging event (SubscribePropertyChangingEvents), for
an object that implements IReactiveObject by hand.
subscribe_property_changed_events
fn subscribe_property_changed_events(self: &Self)
Makes changes raise the PropertyChanged event (SubscribePropertyChangedEvents).
suppress_change_notifications
fn suppress_change_notifications(self: &Self) -> Rc<dyn IDisposable>
Stops all change notifications until the result is disposed
(SuppressChangeNotifications); the calls nest.
are_change_notifications_enabled
fn are_change_notifications_enabled(self: &Self) -> bool
Whether change notifications are sent (AreChangeNotificationsEnabled).
delay_change_notifications
fn delay_change_notifications(self: &Self) -> Rc<dyn IDisposable>
Keeps the change notifications until the result is disposed, then sends the last one of
each property (DelayChangeNotifications); the calls nest.
are_change_notifications_delayed
fn are_change_notifications_delayed(self: &Self) -> bool
Whether change notifications are delayed (AreChangeNotificationsDelayed).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.