SettableProperty
struct · ferroui-reactiveui · v0.5.0
struct SettableProperty<S, V>
A property a binding reads, observes and writes: its PropertyPath (the getter, the names
and the observation of its steps) and a setter that writes the value at the end of the path.
settable_prop! writes one from the getters, with the setter
set_<last getter> of the object that owns the last property (x => x.Address.Street sets
with x.address().set_street(value)). new takes any setter, for a path whose
owner may be absent or a setter of another name.
Members
new
fn new(path: PropertyPath<S, V>, set: impl Fn(&S, V) -> () + 'static) -> Self
The property at the end of path, written by set.
path
fn path(self: &Self) -> &PropertyPath<S, V>
The path of the property.
get
fn get(self: &Self, source: &S) -> V
The value of the property on source.
set
fn set(self: &Self, source: &S, value: V)
Writes value to the property on source.
setter
fn setter(self: &Self) -> Rc<dyn Fn(&S, V) -> ()>
The setter of the property.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.