FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FuncValueConverterWithParameter

    struct · ferroui-base · v0.5.0

    struct FuncValueConverterWithParameter<TIn, TParam, TOut>
    

    A general purpose IValueConverter that uses a function of the value and the converter parameter to provide the converter logic.

    TIn is the input type, TParam the parameter type and TOut the output type. An input that is not a TIn, or a parameter that is not a TParam, converts to the unset value marker.

    View source

    Members

    new

    fn new(convert: impl Fn(TIn, TParam) -> TOut + 'static) -> Self
    

    Creates a converter from the function that converts TIn to TOut.

    Source

    new_two_way

    fn new_two_way(convert: impl Fn(TIn, TParam) -> TOut + 'static, convert_back: impl Fn(TOut, TParam) -> TIn + 'static) -> Self
    

    Creates a converter from the function that converts TIn to TOut and the function that converts TOut back to TIn.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • IValueConverter

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.