pub struct FerroPropertyChangedEventArgs<'a> { /* private fields */ }Expand description
Provides information for a property change.
The values are borrowed for the duration of the notification; use the typed accessors to copy them out.
Implementations§
Source§impl<'a> FerroPropertyChangedEventArgs<'a>
impl<'a> FerroPropertyChangedEventArgs<'a>
Sourcepub fn sender(&self) -> &'a FerroObject
pub fn sender(&self) -> &'a FerroObject
The object that the property changed on.
Sourcepub fn property(&self) -> &'static FerroProperty
pub fn property(&self) -> &'static FerroProperty
The property that changed.
Sourcepub fn old_value(&self) -> Option<&'a dyn Any>
pub fn old_value(&self) -> Option<&'a dyn Any>
The old value of the property, untyped. None when only the base
value changed.
Sourcepub fn priority(&self) -> BindingPriority
pub fn priority(&self) -> BindingPriority
The priority of the binding that produced the value.
Sourcepub fn is_effective_value_change(&self) -> bool
pub fn is_effective_value_change(&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).
Sourcepub fn get_old_value<T: Clone + 'static>(&self) -> Option<T>
pub fn get_old_value<T: Clone + 'static>(&self) -> Option<T>
Gets the old value of the property. Panics if T is not the type of
the property.
Sourcepub fn get_new_value<T: Clone + 'static>(&self) -> T
pub fn get_new_value<T: Clone + 'static>(&self) -> T
Gets the new value of the property. Panics if T is not the type of
the property.
Sourcepub fn get_old_and_new_value<T: Clone + 'static>(&self) -> (T, T)
pub fn get_old_and_new_value<T: Clone + 'static>(&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.
Sourcepub fn to_owned_args(&self) -> OwnedFerroPropertyChangedEventArgs
pub fn to_owned_args(&self) -> OwnedFerroPropertyChangedEventArgs
The change held by value: the form a handler receives that cannot borrow the values (a handler attached from markup).
Trait Implementations§
Source§impl WeakEventArgs for FerroPropertyChangedEventArgs<'static>
impl WeakEventArgs for FerroPropertyChangedEventArgs<'static>
type Args<'a> = FerroPropertyChangedEventArgs<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FerroPropertyChangedEventArgs<'a>
impl<'a> !Send for FerroPropertyChangedEventArgs<'a>
impl<'a> !Sync for FerroPropertyChangedEventArgs<'a>
impl<'a> !UnwindSafe for FerroPropertyChangedEventArgs<'a>
impl<'a> Freeze for FerroPropertyChangedEventArgs<'a>
impl<'a> Unpin for FerroPropertyChangedEventArgs<'a>
impl<'a> UnsafeUnpin for FerroPropertyChangedEventArgs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more