This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.
yew_agent::oneshot

Trait Oneshot

pub trait Oneshot: Future {
    type Input;

    // Required method
    fn create(input: Self::Input) -> Self;
}
Expand description

A future-based worker that for each input, one output is produced.

Required Associated Types§

type Input

Incoming message type.

Required Methods§

fn create(input: Self::Input) -> Self

Creates an oneshot worker.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§