pub struct PropertyValue<T, V> { /* private fields */ }Expand description
A value of a property and the object it was read from (PropertyValue<TObject, TValue>).
Upstream’s value of a path that a null step interrupts is the default value of TValue, with a
flag (UnobtainableValue); here it is None (value).
Implementations§
Source§impl<T, V> PropertyValue<T, V>
impl<T, V> PropertyValue<T, V>
Sourcepub fn new(sender: T, value: V) -> Self
pub fn new(sender: T, value: V) -> Self
The value of a property of sender (PropertyValue(TObject sender, TValue value)).
Sourcepub fn unobtainable(sender: T) -> Self
pub fn unobtainable(sender: T) -> Self
A value that could not be read, as a step of the path was null
(PropertyValue(TObject sender)).
Sourcepub fn into_value(self) -> Option<V>
pub fn into_value(self) -> Option<V>
The value, giving up the rest.
Sourcepub fn is_unobtainable(&self) -> bool
pub fn is_unobtainable(&self) -> bool
Whether the value could not be read, as a step of the path was null (UnobtainableValue).
Trait Implementations§
Auto Trait Implementations§
impl<T, V> Freeze for PropertyValue<T, V>
impl<T, V> RefUnwindSafe for PropertyValue<T, V>
impl<T, V> Send for PropertyValue<T, V>
impl<T, V> Sync for PropertyValue<T, V>
impl<T, V> Unpin for PropertyValue<T, V>
impl<T, V> UnsafeUnpin for PropertyValue<T, V>
impl<T, V> UnwindSafe for PropertyValue<T, V>
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
Mutably borrows from an owned value. Read more