BindingChange
struct · ferroui-reactiveui · v0.5.0
struct BindingChange
A value a two-way binding moved, and which side of the binding produced it (BindingChange).
A two-way binding's change stream carries both directions, so a subscriber that acted on every value without knowing where it came from would act twice on its own write. The flag is what separates an edit from the echo of one.
The value is type-erased, as upstream's object? Value: a change from the view model carries
the value written to the view, a change from the view the value written to the view model, and
the two may differ in type. value_as reads it back.
Members
value
value: std::rc::Rc<dyn Any>
The value that was written (Value).
from_view_model
from_view_model: bool
Whether the view model produced the value, rather than the view (FromViewModel).
new
fn new<T: 'static>(value: T, from_view_model: bool) -> Self
A change of value, produced by the view model when from_view_model is true.
value_as
fn value_as<T: 'static>(self: &Self) -> Option<&T>
The value, when it is a T.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDebugIObservable<BindingChange>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.