# SynchronousCompletionAsyncResultSource

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/utilities/struct-synchronouscompletionasyncresultsource/

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

```rust
struct SynchronousCompletionAsyncResultSource<T>
```

The producer side of a [`SynchronousCompletionAsyncResult`](/docs/0.5.0/api/ferroui-base/utilities/struct-synchronouscompletionasyncresult/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/synchronous_completion_async_result.rs#L54)

## Members

- [`new`](#function-new)
- [`async_result`](#function-async_result)
- [`set_result`](#function-set_result)
- [`try_set_result`](#function-try_set_result)

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

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/synchronous_completion_async_result.rs#L71)

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

### async_result

```rust
fn async_result(self: &Self) -> SynchronousCompletionAsyncResult<T>
```

The consumer side of the operation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/synchronous_completion_async_result.rs#L76)

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

### set_result

```rust
fn set_result(self: &Self, result: T)
```

Completes the operation and runs its continuations. Panics if it is
already completed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/synchronous_completion_async_result.rs#L94)

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

### try_set_result

```rust
fn try_set_result(self: &Self, result: T)
```

Completes the operation unless it is already completed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/synchronous_completion_async_result.rs#L109)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`

## Availability

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