FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FerroPropertyChangedEventArgs

    struct · ferroui-base · v0.5.0

    struct FerroPropertyChangedEventArgs<'a>
    

    Provides information for a property change.

    The values are borrowed for the duration of the notification; use the typed accessors to copy them out.

    View source

    Members

    sender

    fn sender(self: &Self) -> &'a FerroObject
    

    The object that the property changed on.

    Source

    property

    fn property(self: &Self) -> &'static FerroProperty
    

    The property that changed.

    Source

    old_value

    fn old_value(self: &Self) -> Option<&'a dyn Any>
    

    The old value of the property, untyped. None when only the base value changed.

    Source

    new_value

    fn new_value(self: &Self) -> &'a dyn Any
    

    The new value of the property, untyped.

    Source

    priority

    fn priority(self: &Self) -> BindingPriority
    

    The priority of the binding that produced the value.

    Source

    is_effective_value_change

    fn is_effective_value_change(self: &Self) -> bool
    

    Whether the change represents a change to the effective value of the property (as opposed to a change of a lower-priority base value).

    Source

    is_inherited_value_change

    fn is_inherited_value_change(self: &Self) -> bool
    

    Whether an ancestor or inheritance-parent change produced this notification. This differs from the resulting value's priority: clearing a local value can expose an inherited value while still being an edit on this object.

    Source

    get_old_value

    fn get_old_value<T: Clone + 'static>(self: &Self) -> Option<T>
    

    Gets the old value of the property. Panics if T is not the type of the property.

    Source

    get_new_value

    fn get_new_value<T: Clone + 'static>(self: &Self) -> T
    

    Gets the new value of the property. Panics if T is not the type of the property.

    Source

    get_old_and_new_value

    fn get_old_and_new_value<T: Clone + 'static>(self: &Self) -> (T, T)
    

    Gets the old and new values of the property. Panics if T is not the type of the property or if there is no old value.

    Source

    to_owned_args

    fn to_owned_args(self: &Self) -> OwnedFerroPropertyChangedEventArgs
    

    The change held by value: the form a handler receives that cannot borrow the values (a handler attached from markup).

    Source

    Trait implementations

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

    Availability

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