TypeConverter
trait · ferroui-markup-xaml · v0.5.0
trait TypeConverter
Converts values of other types (text, above all) to the type the converter is for, and back.
The defaults are the ones of the base class of the managed original: a converter converts from nothing and to text.
Members
can_convert_from
fn can_convert_from(self: &Self, _context: Option<&Rc<dyn ITypeDescriptorContext>>, _source_type: ValueType) -> bool
Whether the converter can convert a value of source_type to its
type.
convert_from
fn convert_from(self: &Self, _context: Option<&Rc<dyn ITypeDescriptorContext>>, _culture: Option<&CultureInfo>, value: Option<&BoxedValue>) -> Result<Option<BoxedValue>, XamlLoadError>
Converts value to the type of the converter.
can_convert_to
fn can_convert_to(self: &Self, _context: Option<&Rc<dyn ITypeDescriptorContext>>, destination_type: ValueType) -> bool
Whether the converter can convert a value of its type to
destination_type.
convert_to
fn convert_to(self: &Self, _context: Option<&Rc<dyn ITypeDescriptorContext>>, _culture: Option<&CultureInfo>, value: Option<&BoxedValue>, destination_type: ValueType) -> Result<Option<BoxedValue>, XamlLoadError>
Converts value to destination_type.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.