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.
Members
new
fn new<I: Clone + PartialEq + 'static, O: Clone + Default + 'static>(interaction: ReactiveInteraction<I, O>) -> Self
Wraps interaction.
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.
downcast
fn downcast<I: 'static, O: 'static>(self: &Self) -> Option<ReactiveInteraction<I, O>>
The wrapped interaction, if its types are I and O.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneFrom<Interaction<I, O>>PartialEqDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.