pub struct InpcPropertyAccessor { /* private fields */ }Expand description
A property accessor over an IPropertyInfo that listens to the owner’s
property change notifications.
Implementations§
Source§impl InpcPropertyAccessor
impl InpcPropertyAccessor
Sourcepub fn new(
reference: WeakValue,
property: Rc<dyn IPropertyInfo>,
inpc: Option<InpcLookup>,
) -> Rc<dyn IPropertyAccessor>
pub fn new( reference: WeakValue, property: Rc<dyn IPropertyInfo>, inpc: Option<InpcLookup>, ) -> Rc<dyn IPropertyAccessor>
Creates an accessor for property of the object behind
reference. inpc views the object as a property change notifier;
None for an object that raises no notifications.
Sourcepub fn with_runtime_notifier(
reference: WeakValue,
property: Rc<dyn IPropertyInfo>,
) -> Rc<dyn IPropertyAccessor>
pub fn with_runtime_notifier( reference: WeakValue, property: Rc<dyn IPropertyInfo>, ) -> Rc<dyn IPropertyAccessor>
Creates an accessor for property of the object behind
reference, whose property change notifications are looked up at
run time: when the accessor subscribes, the object is asked (through
the metadata its type declared, see ModelTypes) whether it raises
property change notifications, as the cast to the notification
interface does in the managed original.
Sourcepub fn runtime_notifier() -> InpcLookup
pub fn runtime_notifier() -> InpcLookup
The run-time lookup of the property change notifications of an object: through the metadata its type declared.
Sourcepub fn find_notifier(
value: &dyn AnyValue,
) -> Option<&dyn INotifyPropertyChanged>
pub fn find_notifier( value: &dyn AnyValue, ) -> Option<&dyn INotifyPropertyChanged>
The property change notifications of an object, if the metadata its type declared says it raises them. This is the one place where the accessors of the string-path bindings decide whether an owner notifies.
Sourcepub fn for_notifying<O: INotifyPropertyChanged + 'static>(
reference: WeakValue,
property: Rc<dyn IPropertyInfo>,
) -> Rc<dyn IPropertyAccessor>
pub fn for_notifying<O: INotifyPropertyChanged + 'static>( reference: WeakValue, property: Rc<dyn IPropertyInfo>, ) -> Rc<dyn IPropertyAccessor>
Creates an accessor for a property of owner type O, which raises
property change notifications.
Trait Implementations§
Source§impl Drop for InpcPropertyAccessor
impl Drop for InpcPropertyAccessor
Source§impl IDisposable for InpcPropertyAccessor
impl IDisposable for InpcPropertyAccessor
Source§impl IPropertyAccessor for InpcPropertyAccessor
impl IPropertyAccessor for InpcPropertyAccessor
Source§fn property_type(&self) -> Option<ValueType>
fn property_type(&self) -> Option<ValueType>
None if the accessor is in an error
state.Source§fn value(&self) -> Option<BoxedValue>
fn value(&self) -> Option<BoxedValue>
Source§fn set_value(
&self,
value: Option<&BoxedValue>,
_priority: BindingPriority,
) -> Result<bool, BindingError>
fn set_value( &self, value: Option<&BoxedValue>, _priority: BindingPriority, ) -> Result<bool, BindingError>
Ok(false) if the property cannot be
written; an Err is the equivalent of the setter throwing.Source§fn subscribe(&self, listener: AccessorListener)
fn subscribe(&self, listener: AccessorListener)
Source§fn unsubscribe(&self)
fn unsubscribe(&self)
Auto Trait Implementations§
impl !Freeze for InpcPropertyAccessor
impl !RefUnwindSafe for InpcPropertyAccessor
impl !Send for InpcPropertyAccessor
impl !Sync for InpcPropertyAccessor
impl !UnwindSafe for InpcPropertyAccessor
impl Unpin for InpcPropertyAccessor
impl UnsafeUnpin for InpcPropertyAccessor
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