ColorToBrushConverter
struct · ferroui-markup-xaml · v0.5.0
struct ColorToBrushConverter
Converts a color to a brush when a brush is asked for: what lets a color resource be used where a brush is expected.
Members
new
fn new() -> Rc<Self>
convert_to
fn convert_to(value: Option<BoxedValue>, target_type: Option<ValueType>) -> Option<BoxedValue>
If target_type is the brush type and value is a color: a solid
color brush of that color. Otherwise the value unchanged.
convert_back_to
fn convert_back_to(value: Option<BoxedValue>, target_type: Option<ValueType>) -> Option<BoxedValue>
If target_type is the color type and value is a solid color
brush: the color of the brush. Otherwise the value unchanged.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherIValueConverterPartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.