FuncValueConverter
struct · ferroui-base · v0.5.0
struct FuncValueConverter<TIn, TOut>
A general purpose IValueConverter that uses a function to provide the
converter logic.
TIn is the input type and TOut the output type. Use Option<T> for
inputs that may be null and Option<BoxedValue> for "any value". An
input that is not a TIn converts to the unset value marker.
Members
new
fn new(convert: impl Fn(TIn) -> TOut + 'static) -> Self
Creates a converter from the function that converts TIn to TOut.
new_two_way
fn new_two_way(convert: impl Fn(TIn) -> TOut + 'static, convert_back: impl Fn(TOut) -> TIn + 'static) -> Self
Creates a converter from the function that converts TIn to TOut
and the function that converts TOut back to TIn.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherIValueConverter
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.