CompiledBinding
struct · ferroui-base · v0.5.0
struct CompiledBinding
A binding that uses compiled paths: typed accessors instead of member lookup by name.
A binding is a mutable reference object: it is created with
CompiledBinding::empty or CompiledBinding::new, configured
property by property (or with the chaining with_* forms) and shared
as Rc<CompiledBinding>, which converts to Rc<dyn BindingBase>.
Handles compare by identity. The properties are read when the binding
is instantiated on a target: changing them afterwards affects later
instances only.
Members
snapshot_for_reloadconverterset_converterwith_converter_valueconverter_cultureset_converter_culturewith_converter_cultureconverter_parameterset_converter_parameterwith_converter_parameterdelayset_delaywith_delayfallback_valueset_fallback_valuewith_fallback_valuemodeset_modewith_modepathset_pathwith_pathpriorityset_prioritywith_prioritysourceset_sourcewith_sourcestring_formatset_string_formatwith_string_formattarget_null_valueset_target_null_valuewith_target_null_valueupdate_source_triggerset_update_source_triggerwith_update_source_triggerdefault_anchorset_default_anchorwith_default_anchorname_scopeset_name_scopewith_name_scopeemptynewwith_converter
snapshot_for_reload
fn snapshot_for_reload(self: &Self) -> ::std::rc::Rc<Self>
An independent description for a development transaction. Keep it only through preparation: explicit sources can own application objects.
converter
fn converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
The converter to use.
set_converter
fn set_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
with_converter_value
fn with_converter_value(self: ::std::rc::Rc<Self>, value: Option<Rc<dyn IValueConverter>>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
converter_culture
fn converter_culture(self: &Self) -> Option<CultureInfo>
The culture in which to evaluate the converter. None (the
default) uses the current culture.
set_converter_culture
fn set_converter_culture(self: &Self, value: Option<CultureInfo>)
with_converter_culture
fn with_converter_culture(self: ::std::rc::Rc<Self>, value: Option<CultureInfo>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
converter_parameter
fn converter_parameter(self: &Self) -> Option<BoxedValue>
A parameter to pass to the converter.
set_converter_parameter
fn set_converter_parameter(self: &Self, value: Option<BoxedValue>)
with_converter_parameter
fn with_converter_parameter(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
delay
fn delay(self: &Self) -> i32
The amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.
set_delay
fn set_delay(self: &Self, value: i32)
with_delay
fn with_delay(self: ::std::rc::Rc<Self>, value: i32) -> ::std::rc::Rc<Self>
The chaining form of the setter.
fallback_value
fn fallback_value(self: &Self) -> Option<BoxedValue>
The value to use when the binding is unable to produce a value; the unset marker for none.
set_fallback_value
fn set_fallback_value(self: &Self, value: Option<BoxedValue>)
with_fallback_value
fn with_fallback_value(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
mode
fn mode(self: &Self) -> BindingMode
The binding mode.
set_mode
fn set_mode(self: &Self, value: BindingMode)
with_mode
fn with_mode(self: ::std::rc::Rc<Self>, value: BindingMode) -> ::std::rc::Rc<Self>
The chaining form of the setter.
path
fn path(self: &Self) -> Option<CompiledBindingPath>
The binding path.
set_path
fn set_path(self: &Self, value: Option<CompiledBindingPath>)
with_path
fn with_path(self: ::std::rc::Rc<Self>, value: Option<CompiledBindingPath>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
priority
fn priority(self: &Self) -> BindingPriority
The binding priority.
set_priority
fn set_priority(self: &Self, value: BindingPriority)
with_priority
fn with_priority(self: ::std::rc::Rc<Self>, value: BindingPriority) -> ::std::rc::Rc<Self>
The chaining form of the setter.
source
fn source(self: &Self) -> Option<BoxedValue>
The source for the binding; the unset marker (the default) binds to the data context or to the element selected by the path.
set_source
fn set_source(self: &Self, value: Option<BoxedValue>)
with_source
fn with_source(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
string_format
fn string_format(self: &Self) -> Option<String>
The string format.
set_string_format
fn set_string_format(self: &Self, value: Option<String>)
with_string_format
fn with_string_format(self: ::std::rc::Rc<Self>, value: Option<String>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
target_null_value
fn target_null_value(self: &Self) -> Option<BoxedValue>
The value to use when the binding produces null; the unset marker for none.
set_target_null_value
fn set_target_null_value(self: &Self, value: Option<BoxedValue>)
with_target_null_value
fn with_target_null_value(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
update_source_trigger
fn update_source_trigger(self: &Self) -> UpdateSourceTrigger
What triggers updates of the binding source in two-way and one-way-to-source bindings.
set_update_source_trigger
fn set_update_source_trigger(self: &Self, value: UpdateSourceTrigger)
with_update_source_trigger
fn with_update_source_trigger(self: ::std::rc::Rc<Self>, value: UpdateSourceTrigger) -> ::std::rc::Rc<Self>
The chaining form of the setter.
default_anchor
fn default_anchor(self: &Self) -> Option<WeakRef<FerroObject>>
The anchor to use if the target is not an element.
set_default_anchor
fn set_default_anchor(self: &Self, value: Option<WeakRef<FerroObject>>)
with_default_anchor
fn with_default_anchor(self: ::std::rc::Rc<Self>, value: Option<WeakRef<FerroObject>>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
name_scope
fn name_scope(self: &Self) -> Option<Weak<dyn INameScope>>
The name scope of the place in markup where the binding was created.
set_name_scope
fn set_name_scope(self: &Self, value: Option<Weak<dyn INameScope>>)
with_name_scope
fn with_name_scope(self: ::std::rc::Rc<Self>, value: Option<Weak<dyn INameScope>>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
empty
fn empty() -> Rc<Self>
Creates a binding without a path (the parameterless constructor).
new
fn new(path: CompiledBindingPath) -> Rc<Self>
Creates a binding with the given path.
with_converter
fn with_converter(self: Rc<Self>, converter: Rc<dyn IValueConverter>) -> Rc<Self>
The chaining form of set_converter, for a
converter.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAnyValueClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefaultPartialEqBindingBaseMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.