MultiBinding
struct · ferroui-base · v0.5.0
struct MultiBinding
A binding that aggregates multiple bindings through a converter.
A binding is a mutable reference object: it is created with
MultiBinding::new, configured property by property (or with the
chaining with_* forms) and shared as Rc<MultiBinding>, which
converts to Rc<dyn BindingBase>. Handles compare by identity. The
properties, and the contents of the collection of child bindings, are
read when the binding is instantiated on a target: changing them
afterwards affects later instances only.
Members
snapshot_for_reloadbindingsset_bindingswith_bindings_listconverterset_converterwith_converter_valueconverter_cultureset_converter_culturewith_converter_cultureconverter_parameterset_converter_parameterwith_converter_parameterfallback_valueset_fallback_valuewith_fallback_valuemodeset_modewith_modepriorityset_prioritywith_priorityrelative_sourceset_relative_sourcewith_relative_sourcestring_formatset_string_formatwith_string_formattarget_null_valueset_target_null_valuewith_target_null_valuenewwith_bindingswith_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.
bindings
fn bindings(self: &Self) -> FerroList<Rc<dyn BindingBase>>
The collection of child bindings. The list is a shared handle: children are added to the list the getter returns.
set_bindings
fn set_bindings(self: &Self, value: FerroList<Rc<dyn BindingBase>>)
with_bindings_list
fn with_bindings_list(self: ::std::rc::Rc<Self>, value: FerroList<Rc<dyn BindingBase>>) -> ::std::rc::Rc<Self>
The chaining form of the setter.
converter
fn converter(self: &Self) -> Option<Rc<dyn IMultiValueConverter>>
The converter to use.
set_converter
fn set_converter(self: &Self, value: Option<Rc<dyn IMultiValueConverter>>)
with_converter_value
fn with_converter_value(self: ::std::rc::Rc<Self>, value: Option<Rc<dyn IMultiValueConverter>>) -> ::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.
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. Only one-time and one-way are supported.
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.
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.
relative_source
fn relative_source(self: &Self) -> Option<Rc<RelativeSource>>
The relative source for the binding.
set_relative_source
fn set_relative_source(self: &Self, value: Option<Rc<RelativeSource>>)
with_relative_source
fn with_relative_source(self: ::std::rc::Rc<Self>, value: Option<Rc<RelativeSource>>) -> ::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.
new
fn new() -> Rc<Self>
Creates a multi-binding without child bindings.
with_bindings
fn with_bindings(self: Rc<Self>, bindings: Vec<Rc<dyn BindingBase>>) -> Rc<Self>
The chaining form of adding child bindings: replaces the contents of the collection of child bindings.
with_converter
fn with_converter(self: Rc<Self>, converter: Rc<dyn IMultiValueConverter>) -> 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.