# IInteractionContext

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/interactions/trait-iinteractioncontext/

**trait** · [`ferroui-reactiveui`](/docs/0.5.0/api/ferroui-reactiveui/) · v0.5.0

```rust
trait IInteractionContext<I, O>
```

The contextual information of an interaction, which its handlers receive
(`IInteractionContext<TInput, TOutput>`): the input, whether a handler set the output, and the
setting of the output.

A handler should set the output once; a second call is a logic error and panics. A handler
that should only respond when no other did checks `is_handled` first.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/interactions/i_interaction_context.rs#L10)

## Members

- [`input`](#function-input)
- [`is_handled`](#function-is_handled)
- [`set_output`](#function-set_output)

<a id="function-input"></a>

### input

```rust
fn input(self: &Self) -> &I
```

The input of the interaction (`Input`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/interactions/i_interaction_context.rs#L12)

<a id="function-is_handled"></a>

### is_handled

```rust
fn is_handled(self: &Self) -> bool
```

Whether the interaction is handled, that is whether the output was set (`IsHandled`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/interactions/i_interaction_context.rs#L15)

<a id="function-set_output"></a>

### set_output

```rust
fn set_output(self: &Self, output: O)
```

Sets the output of the interaction (`SetOutput(TOutput)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/interactions/i_interaction_context.rs#L18)

## Trait implementations

- [`IInteractionContext<I, O>`](/docs/0.5.0/api/ferroui-reactiveui/binding/interactions/trait-iinteractioncontext/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
