FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    UntypedReversiblePropertyChange

    struct · ferroui-xaml-interactivity · v0.5.0

    struct UntypedReversiblePropertyChange
    

    Coordinates reversible property changes of one property across action instances: the changes of a property of a target form a stack, and reverting a change restores the value below it (an internal class of the reference).

    Deviation (DEVIATIONS.md, Behaviors): the reference names this class and the typed public class ReversiblePropertyChange alike (ReversiblePropertyChange and ReversiblePropertyChange<TTarget, TValue>); one Rust name cannot be both.

    View source

    Members

    new

    fn new(property_name: &str) -> Self
    

    Creates the coordinator of the property property_name.

    Panics

    Panics if the name is empty.

    Source

    apply

    fn apply(self: &Self, target: &BoxedValue, value: Option<&BoxedValue>, getter: TryGetValue<'_>, setter: Setter, temporary_setter: TrySetTemporaryValue, is_direct_property: bool) -> bool
    

    Applies value to the property of target, keeping what revert needs. Returns false when the value was not applied (a direct property, or a getter or setter that failed).

    Source

    revert

    fn revert(self: &Self) -> bool
    

    Reverts the value this coordinator applied. Returns false when there is nothing to revert or the value below could not be restored.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

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