Skip to main content

Replies

Trait Replies 

Source
pub trait Replies<R, E>: Sized { }
Available on crate feature rpc only.
Expand description

What a handler returns, for a procedure whose reply is R.

A future fits a Once reply, and a stream fits a Strand. Sitting on what the handler returns puts that type first in rustc’s errors.

Sealed.

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§

Source§

impl<Fut, T, E> Replies<Once<T>, E> for Fut
where Fut: Future<Output = Result<T, E>> + Send + 'static, T: Serialize + 'static, E: Serialize + 'static,

Source§

impl<St, T, E> Replies<Strand<T>, E> for St
where St: Stream<Item = Result<T, E>> + Send + 'static, T: Serialize + 'static, E: Serialize + 'static,