IBindingFallbackConverter
trait · ferroui-reactiveui · v0.5.0
trait IBindingFallbackConverter
A converter that the bindings ask when no typed converter handles a pair of types
(IBindingFallbackConverter). It decides at run time, from the two types, whether and how well
it converts; BindingFallbackConverterRegistry picks
the one with the highest affinity.
Members
get_affinity_for_objects
fn get_affinity_for_objects(self: &Self, from_type: ConverterType, to_type: ConverterType) -> i32
How well this converter converts from from_type to to_type: a positive score when it
can, where a higher score wins; zero or less when it cannot (GetAffinityForObjects).
try_convert
fn try_convert(self: &Self, from_type: ConverterType, from: &dyn Any, to_type: ConverterType, conversion_hint: Option<&dyn Any>) -> Option<Rc<dyn Any>>
Converts from, a value of from_type, to a value of to_type, with an optional
conversion_hint; None when the conversion fails (TryConvert).
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.