# EventPattern

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/linq/struct-eventpattern/

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

```rust
struct EventPattern<S, A>
```

The sender and the arguments of an event (`EventPattern<TSender, TEventArgs>` and
`IEventPattern<TSender, TEventArgs>`). Two patterns are equal when their senders and their
arguments are.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/event_pattern.rs#L23)

## Members

- [`sender`](#struct_field-sender)
- [`event_args`](#struct_field-event_args)
- [`new`](#function-new)
- [`into_parts`](#function-into_parts)

<a id="struct_field-sender"></a>

### sender

```rust
sender: S
```

The sender of the event (`Sender`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/event_pattern.rs#L25)

<a id="struct_field-event_args"></a>

### event_args

```rust
event_args: A
```

The arguments of the event (`EventArgs`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/event_pattern.rs#L27)

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

### new

```rust
fn new(sender: S, event_args: A) -> Self
```

The pattern of an event of `sender` with `event_args` (`EventPattern(TSender, TEventArgs)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/event_pattern.rs#L32)

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

### into_parts

```rust
fn into_parts(self: Self) -> (S, A)
```

The sender and the arguments (`Deconstruct`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/linq/event_pattern.rs#L37)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Default`
- [`EventPatternValue`](/docs/0.5.0/api/ferroui-reactive/linq/trait-eventpatternvalue/)

## Availability

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