fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle
    where
        S: Stream + 'static,
        Self: StreamHandler<S::Item>,
        Self::Context: AsyncContext<Self>,
    {
        if ctx.state() == ActorState::Stopped {
            error!("Context::add_stream called for stopped actor.");
            SpawnHandle::default()
        } else {
            ctx.spawn(ActorStream::new(stream))
        }
    }
/// Register a Stream to the actor context.
Register a Stream to the actor context.
Register a Stream to the actor context .
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle
    where
        S: Stream + 'static,
        Self: StreamHandler<S::Item>,
        Self::Context: AsyncContext<Self>,
    {
        if ctx.state() == ActorState::Stopped {
            error!("Context::add_stream called for stopped actor.");
            SpawnHandle::default()
        } else {
            ctx.spawn(ActorStream::new(stream))
        }
    }
fn add_stream < S > ( stream : S , ctx : & mut Self :: Context ) -> SpawnHandle where S : Stream + ' static , Self : StreamHandler < S :: Item > , Self :: Context : AsyncContext < Self > , { if ctx . state ( ) == ActorState :: Stopped { error ! ( " " ) ; SpawnHandle :: default ( ) } else { ctx . spawn ( ActorStream :: new ( stream ) ) } }
Register a Stream to the actor context.
Register a Stream to the actor context .
stream
S
ctx
&mut Self::Context
stream
S
ctx
&mut Self::Context