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

Trait ReactorScoped

pub trait ReactorScoped: Stream + FusedStream {
    type Input;
    type Output;

    // Required method
    fn new<IS, OS>(input_stream: IS, output_sink: OS) -> Self
       where IS: Stream<Item = Self::Input> + FusedStream + 'static,
             OS: Sink<Self::Output, Error = Infallible> + 'static;
}
Expand description

A helper trait to extract the input and output type from a [ReactorStream].

Required Associated Types§

type Input

The Input Message.

type Output

The Output Message.

Required Methods§

fn new<IS, OS>(input_stream: IS, output_sink: OS) -> Self
where IS: Stream<Item = Self::Input> + FusedStream + 'static, OS: Sink<Self::Output, Error = Infallible> + 'static,

Creates a ReactorReceiver.

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§

§

impl<I, O> ReactorScoped for ReactorScope<I, O>

§

type Input = I

§

type Output = O