pub struct MultiBinding { /* private fields */ }Expand description
A code-built Noesis::MultiBinding. Add child Bindings with
add_binding, attach a MultiConverter with
converter, then wire it onto a target DP with
set_on.
Owns a +1 reference released on drop. set_on makes Noesis
take its own reference.
Implementations§
Source§impl MultiBinding
impl MultiBinding
Sourcepub fn add_binding(self, binding: Binding) -> Self
pub fn add_binding(self, binding: Binding) -> Self
Append a child Binding. Order matters: it determines the index of
this binding’s value in the MultiValueConverter::convert values
slice. The MultiBinding takes its own reference to the child, so the
passed Binding is consumed (dropped after wiring). Chainable.
Sourcepub fn converter(self, converter: &MultiConverter) -> Self
pub fn converter(self, converter: &MultiConverter) -> Self
Attach a Rust MultiConverter. The binding takes its own reference, so
the handle may be dropped afterwards. Chainable.
Sourcepub fn converter_parameter(self, parameter: &Boxed) -> Self
pub fn converter_parameter(self, parameter: &Boxed) -> Self
Set the converter parameter (a boxed value passed to the converter on every call). The binding stores its own reference. Chainable.
Sourcepub fn mode(self, mode: BindingMode) -> Self
pub fn mode(self, mode: BindingMode) -> Self
Set the BindingMode. Chainable.