FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    BindingTypeConverterRegistry

    struct · ferroui-reactiveui · v0.5.0

    struct BindingTypeConverterRegistry
    

    The typed converters, by the exact pair of their source and target types (BindingTypeConverterRegistry). Of the converters of a pair, the one with the highest positive affinity is the one used; on a tie the first registered wins.

    A lookup reads a snapshot of the registrations, so a converter may register others while it is asked for its affinity.

    View source

    Members

    new

    fn new() -> Self
    

    An empty registry.

    Source

    register

    fn register(self: &Self, converter: Rc<dyn IBindingTypeConverter>)
    

    Registers converter under the pair of its source and target types (Register).

    Source

    try_get_converter

    fn try_get_converter(self: &Self, from_type: ConverterType, to_type: ConverterType) -> Option<Rc<dyn IBindingTypeConverter>>
    

    The converter of the highest positive affinity from from_type to to_type, or None (TryGetConverter).

    Source

    get_all_converters

    fn get_all_converters(self: &Self) -> Vec<Rc<dyn IBindingTypeConverter>>
    

    Every registered converter, pair by pair in the order the pairs were first registered (GetAllConverters).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • Default
    • Debug

    Availability

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