pub struct PropertyAccessorNode { /* private fields */ }Expand description
A node that reads a property through a property accessor plugin: a fixed plugin (compiled binding paths) or, when none is given, the first registered plugin that matches the source (string binding paths).
Implementations§
Source§impl PropertyAccessorNode
impl PropertyAccessorNode
Sourcepub fn new(
property_name: &str,
plugin: Rc<dyn IPropertyAccessorPlugin>,
accepts_null: bool,
) -> Rc<Self>
pub fn new( property_name: &str, plugin: Rc<dyn IPropertyAccessorPlugin>, accepts_null: bool, ) -> Rc<Self>
Creates a node that uses plugin to access the property.
Sourcepub fn new_dynamic(property_name: &str, accepts_null: bool) -> Rc<Self>
pub fn new_dynamic(property_name: &str, accepts_null: bool) -> Rc<Self>
Creates a node that selects the plugin from the registered plugins each time its source changes.
Trait Implementations§
Source§impl Drop for PropertyAccessorNode
impl Drop for PropertyAccessorNode
Source§impl ExpressionNode for PropertyAccessorNode
impl ExpressionNode for PropertyAccessorNode
fn state(&self) -> &NodeState
Source§fn build_string(&self, builder: &mut String)
fn build_string(&self, builder: &mut String)
Appends a string representation of the node to
builder.Source§fn on_source_changed(
&self,
source: Option<&BoxedValue>,
_data_validation_error: Option<&BindingError>,
)
fn on_source_changed( &self, source: Option<&BoxedValue>, _data_validation_error: Option<&BindingError>, )
Subscribes to the new source and updates the current value.
Source§fn unsubscribe(&self, _old_source: &BoxedValue)
fn unsubscribe(&self, _old_source: &BoxedValue)
Unsubscribes from the previous source.
fn as_settable(&self) -> Option<&dyn ISettableNode>
fn as_property_accessor_node(&self) -> Option<&dyn IPropertyAccessorNode>
Source§fn build_string_with_nodes(
&self,
builder: &mut String,
nodes: &[Rc<dyn ExpressionNode>],
)
fn build_string_with_nodes( &self, builder: &mut String, nodes: &[Rc<dyn ExpressionNode>], )
Builds a string representation of the binding path up to this node.
fn as_source_node(&self) -> Option<&dyn SourceNode>
Source§fn is_data_context_node(&self) -> bool
fn is_data_context_node(&self) -> bool
Whether the node reads a data context.
Source§impl IPropertyAccessorNode for PropertyAccessorNode
impl IPropertyAccessorNode for PropertyAccessorNode
fn property_name(&self) -> &str
fn accessor(&self) -> Option<Rc<dyn IPropertyAccessor>>
fn enable_data_validation(&self)
Source§impl ISettableNode for PropertyAccessorNode
impl ISettableNode for PropertyAccessorNode
Source§fn value_type(&self) -> Option<ValueType>
fn value_type(&self) -> Option<ValueType>
The type of the value accepted by the node, or
None if the node is
not currently settable.Source§fn write_value_to_source(
&self,
value: Option<&BoxedValue>,
_nodes: &[Rc<dyn ExpressionNode>],
) -> Result<bool, BindingError>
fn write_value_to_source( &self, value: Option<&BoxedValue>, _nodes: &[Rc<dyn ExpressionNode>], ) -> Result<bool, BindingError>
Tries to write the specified value to the source.
Auto Trait Implementations§
impl !Freeze for PropertyAccessorNode
impl !RefUnwindSafe for PropertyAccessorNode
impl !Send for PropertyAccessorNode
impl !Sync for PropertyAccessorNode
impl !UnwindSafe for PropertyAccessorNode
impl Unpin for PropertyAccessorNode
impl UnsafeUnpin for PropertyAccessorNode
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more