FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AnyInteraction

    struct · ferroui-xaml-interactions-reactiveui · v0.5.0

    struct AnyInteraction
    

    A ReactiveUI interaction (ferroui_reactiveui::Interaction) of any input and output type, as an InteractionTriggerBehavior holds it.

    Deviation (DEVIATIONS.md, Behaviors): the classes of the object model are not generic, so the type arguments TInput and TOutput of the reference travel with the interaction: this value wraps an Interaction<I, O> and registers handlers that receive its input as an untyped value and set the default output (context.SetOutput(default!); the output type implements Default). Clones are the same interaction; two values are equal when they wrap the same interaction.

    View source

    Members

    new

    fn new<I: Clone + PartialEq + 'static, O: Clone + Default + 'static>(interaction: ReactiveInteraction<I, O>) -> Self
    

    Wraps interaction.

    Source

    register_handler

    fn register_handler(self: &Self, handler: impl Fn(Option<BoxedValue>) -> () + 'static) -> Rc<dyn IDisposable>
    

    Registers a handler that receives the input of each question (as an untyped value) and answers it with the default output; disposing the result unregisters it.

    Source

    downcast

    fn downcast<I: 'static, O: 'static>(self: &Self) -> Option<ReactiveInteraction<I, O>>
    

    The wrapped interaction, if its types are I and O.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • From<Interaction<I, O>>
    • PartialEq
    • Debug

    Availability

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