BindingTypeConverterDispatch
struct · ferroui-reactiveui · v0.5.0
struct BindingTypeConverterDispatch
Runs a converter found at run time, typed or fallback, with the checks the bindings rely on
(BindingTypeConverterDispatch).
Members
try_convert
fn try_convert(converter: &dyn IBindingTypeConverter, from: Option<&dyn Any>, to_type: ConverterType, conversion_hint: Option<&dyn Any>) -> Option<Rc<dyn Any>>
Converts from with a typed converter, when the converter's target type is to_type and
from is a value of its source type exactly; None otherwise or when the conversion fails
(TryConvert(IBindingTypeConverter, ..)).
A None input (upstream's null) goes to the converter, which decides.
try_convert_fallback
fn try_convert_fallback(converter: &dyn IBindingFallbackConverter, from_type: ConverterType, from: &dyn Any, to_type: ConverterType, conversion_hint: Option<&dyn Any>) -> Option<Rc<dyn Any>>
Converts from with a fallback converter (TryConvertFallback).
try_convert_any
fn try_convert_any(converter: Option<&ResolvedConverter>, from_type: ConverterType, from: Option<&dyn Any>, to_type: ConverterType, conversion_hint: Option<&dyn Any>) -> Option<Rc<dyn Any>>
Converts from with whatever ConverterService::resolve_converter found: a typed
converter goes through try_convert, a fallback converter through
try_convert_fallback and fails a None input; no converter
fails (TryConvertAny).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>Any
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.