FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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.

    Source

    path

    fn path(self: &Self) -> &PropertyPath<S, V>
    

    The path of the property.

    Source

    get

    fn get(self: &Self, source: &S) -> V
    

    The value of the property on source.

    Source

    set

    fn set(self: &Self, source: &S, value: V)
    

    Writes value to the property on source.

    Source

    setter

    fn setter(self: &Self) -> Rc<dyn Fn(&S, V) -> ()>
    

    The setter of the property.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • Clone
    • Debug

    Availability

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