pub struct BindingExpression { /* private fields */ }Expand description
A binding expression which accepts and produces (possibly boxed) untyped values: a source, a path of expression nodes read from it, and the conversion of the result to the target.
Implementations§
Source§impl BindingExpression
impl BindingExpression
Sourcepub fn new(
source: Option<BoxedValue>,
nodes: Vec<Rc<dyn ExpressionNode>>,
options: BindingExpressionOptions,
) -> Rc<Self>
pub fn new( source: Option<BoxedValue>, nodes: Vec<Rc<dyn ExpressionNode>>, options: BindingExpressionOptions, ) -> Rc<Self>
Creates a binding expression.
source is the object from which the value is read (null is None);
nodes represent the binding path.
Sourcepub fn source_type(&self) -> Option<ValueType>
pub fn source_type(&self) -> Option<ValueType>
The type of the value accepted by the binding source, if it can be written.
pub fn converter(&self) -> Option<&Rc<dyn IValueConverter>>
Sourcepub fn converter_culture(&self) -> CultureInfo
pub fn converter_culture(&self) -> CultureInfo
The culture in which the converter is evaluated: the converter culture of the binding, or the current culture when it names none.
pub fn converter_parameter(&self) -> Option<&BoxedValue>
Sourcepub fn fallback_value(&self) -> Option<BoxedValue>
pub fn fallback_value(&self) -> Option<BoxedValue>
The fallback value; the unset marker if there is none.
pub fn leaf_node(&self) -> Option<&Rc<dyn ExpressionNode>>
pub fn nodes(&self) -> &[Rc<dyn ExpressionNode>]
pub fn mode(&self) -> BindingMode
pub fn string_format(&self) -> Option<&str>
Sourcepub fn target_null_value(&self) -> Option<BoxedValue>
pub fn target_null_value(&self) -> Option<BoxedValue>
The target null value; the unset marker if there is none.
Sourcepub fn delay(&self) -> Duration
pub fn delay(&self) -> Duration
The amount of time to wait before updating the binding source after the value on the target changes.
pub fn update_source_trigger(&self) -> UpdateSourceTrigger
Sourcepub fn error_type(&self) -> BindingErrorType
pub fn error_type(&self) -> BindingErrorType
The current error state of the binding expression.
Sourcepub fn to_observable(
self: &Rc<Self>,
target: Option<&FerroObject>,
) -> Rc<ObservableSink>
pub fn to_observable( self: &Rc<Self>, target: Option<&FerroObject>, ) -> Rc<ObservableSink>
Produces an observable subject over the expression, see
ObservableSink.
Trait Implementations§
Source§impl BindingExpressionBase for BindingExpression
impl BindingExpressionBase for BindingExpression
Source§fn priority(&self) -> BindingPriority
fn priority(&self) -> BindingPriority
Source§fn target_property(&self) -> Option<&'static FerroProperty>
fn target_property(&self) -> Option<&'static FerroProperty>
Source§fn default_priority(&self) -> BindingPriority
fn default_priority(&self) -> BindingPriority
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
Source§fn update_source(&self)
fn update_source(&self)
Source§fn update_target(&self)
fn update_target(&self)
fn as_any(&self) -> &dyn Any
Source§impl Drop for BindingExpression
impl Drop for BindingExpression
Source§impl IDisposable for BindingExpression
impl IDisposable for BindingExpression
Source§impl UntypedBindingExpression for BindingExpression
impl UntypedBindingExpression for BindingExpression
fn base(&self) -> &UntypedBindingExpressionBase
Source§fn description(&self) -> String
fn description(&self) -> String
fn update_source_core(&self)
fn update_target_core(&self)
Source§fn write_value_to_source(&self, value: Option<BoxedValue>) -> bool
fn write_value_to_source(&self, value: Option<BoxedValue>) -> bool
Source§fn should_log_error(&self) -> Option<Ref<FerroObject>>
fn should_log_error(&self) -> Option<Ref<FerroObject>>
Source§fn start_core(&self)
fn start_core(&self)
start.Source§fn dispose_expression(&self)
fn dispose_expression(&self)
Source§fn log_error(&self, error: &str, level: LogEventLevel)
fn log_error(&self, error: &str, level: LogEventLevel)
Auto Trait Implementations§
impl !Freeze for BindingExpression
impl !RefUnwindSafe for BindingExpression
impl !Send for BindingExpression
impl !Sync for BindingExpression
impl !UnwindSafe for BindingExpression
impl Unpin for BindingExpression
impl UnsafeUnpin for BindingExpression
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