pub trait MStream<Item>where
Self: Actor,{
// Provided methods
fn started(&mut self, _: &mut Context<Self>) { ... }
fn state(&mut self, _: &mut Context<Self>) -> MStreamingState { ... }
fn spawn_mstream<S>(&mut self, ctx: &mut Context<Self>, stream: S)
where Self: Actor<Message = S::Item> + MStream<S::Item>,
S: CoreStream + 'static,
S::Item: Message { ... }
fn aborted(&mut self, _: &mut Context<Self>) { ... }
fn paused(&mut self, _: &mut Context<Self>) { ... }
fn resumed(&mut self, _: &mut Context<Self>) { ... }
fn finished(&mut self, _: &mut Context<Self>) { ... }
}
Expand description
An abstraction for Actor’s message stream routine
Provided Methods§
sourcefn state(&mut self, _: &mut Context<Self>) -> MStreamingState
fn state(&mut self, _: &mut Context<Self>) -> MStreamingState
change the state of stream to abort/pause/resume the stream accordingly
Real-Time control or more elaborated execution could be achieved right here
sourcefn spawn_mstream<S>(&mut self, ctx: &mut Context<Self>, stream: S)where
Self: Actor<Message = S::Item> + MStream<S::Item>,
S: CoreStream + 'static,
S::Item: Message,
fn spawn_mstream<S>(&mut self, ctx: &mut Context<Self>, stream: S)where Self: Actor<Message = S::Item> + MStream<S::Item>, S: CoreStream + 'static, S::Item: Message,
add stream to the actor