pub trait Responder {
// Required method
fn respond<C: Command + 'static>(
self,
) -> impl Future<Output = Result<impl Stream<Item = Result<impl ReceivedCommand<C> + Send + Sync + 'static, Error>> + Send + 'static, Error>> + Send + 'static;
}Expand description
Subscribes to incoming commands. Mirrors Subscriber.
respond takes self by value so the returned future is 'static with no
borrow of the implementor. Callers that need to keep a handle should clone
before calling (e.g. conn.clone().respond::<C>()).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".