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

yew_agent/oneshot/
traits.rs

1use std::future::Future;
2
3/// A future-based worker that for each input, one output is produced.
4pub trait Oneshot: Future {
5    /// Incoming message type.
6    type Input;
7
8    /// Creates an oneshot worker.
9    fn create(input: Self::Input) -> Self;
10}