pub trait StreamHandler<M: Send>: Service {
    // Required method
    fn handle(&mut self, msg: M, ctx: &mut ServiceContext<Self>);
Expand description

Handler for accepting streams of messages for a service from streams attached to the service see attach_stream on ServiceContext

Required Methods§


fn handle(&mut self, msg: M, ctx: &mut ServiceContext<Self>)

Handler for handling messages received from a stream

self The service handling the message msg The message received ctx Mutable borrow of the service context