pub struct IndexerBindingExpression { /* private fields */ }Expand description
The binding expression of an
IndexerBinding: binds a property of the
target to a registered property of another object.
The source and the target are held weakly: unlike the managed implementation there is no collector for the reference cycle that a binding between two objects (or of an object to itself) would otherwise create.
Implementations§
Source§impl IndexerBindingExpression
impl IndexerBindingExpression
pub fn new( source: &FerroObject, source_property: &'static FerroProperty, target: &FerroObject, target_property: Option<&'static FerroProperty>, mode: BindingMode, ) -> Rc<Self>
Trait Implementations§
Source§impl BindingExpressionBase for IndexerBindingExpression
impl BindingExpressionBase for IndexerBindingExpression
Source§fn priority(&self) -> BindingPriority
fn priority(&self) -> BindingPriority
The priority of the binding expression.
Source§fn target_property(&self) -> Option<&'static FerroProperty>
fn target_property(&self) -> Option<&'static FerroProperty>
The property that the binding expression is targeting.
Source§fn default_priority(&self) -> BindingPriority
fn default_priority(&self) -> BindingPriority
The preferred priority of the binding expression; the priority passed
to
attach may differ if the binding targets a direct
property, in which case it is elevated to local value priority.Source§fn is_data_validation_enabled(&self) -> bool
fn is_data_validation_enabled(&self) -> bool
Whether data validation is enabled for the binding expression.
Source§fn update_source(&self)
fn update_source(&self)
Sends the current binding target value to the binding source property
in two-way or one-way-to-source bindings. Does nothing for other
modes. If the update source trigger of the binding is explicit, this
must be called for changes to propagate back to the source.
Source§fn update_target(&self)
fn update_target(&self)
Forces a data transfer from the binding source to the binding target.
fn as_any(&self) -> &dyn Any
Source§impl Drop for IndexerBindingExpression
impl Drop for IndexerBindingExpression
Source§impl UntypedBindingExpression for IndexerBindingExpression
impl UntypedBindingExpression for IndexerBindingExpression
fn base(&self) -> &UntypedBindingExpressionBase
Source§fn description(&self) -> String
fn description(&self) -> String
A description of the binding expression.
Source§fn write_value_to_source(&self, value: Option<BoxedValue>) -> bool
fn write_value_to_source(&self, value: Option<BoxedValue>) -> bool
Writes the specified value to the binding source if possible. Returns
true if the value could be written.
Source§fn start_core(&self)
fn start_core(&self)
Starts the binding expression. Do not call directly; call
start.Source§fn should_log_error(&self) -> Option<Ref<FerroObject>>
fn should_log_error(&self) -> Option<Ref<FerroObject>>
The target to log errors against, if an error should be logged given
the current state of the binding expression.
fn update_source_core(&self)
fn update_target_core(&self)
Source§fn dispose_expression(&self)
fn dispose_expression(&self)
Terminates the binding.
Source§fn log_error(&self, error: &str, level: LogEventLevel)
fn log_error(&self, error: &str, level: LogEventLevel)
Logs a binding error against the target, if there is one.
Auto Trait Implementations§
impl !Freeze for IndexerBindingExpression
impl !RefUnwindSafe for IndexerBindingExpression
impl !Send for IndexerBindingExpression
impl !Sync for IndexerBindingExpression
impl !UnwindSafe for IndexerBindingExpression
impl Unpin for IndexerBindingExpression
impl UnsafeUnpin for IndexerBindingExpression
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