Struct actix::dev::ContextImpl
[−]
[src]
pub struct ContextImpl<A> where
A: Actor,
A::Context: AsyncContext<A>, { /* fields omitted */ }
Actor execution context impl
This is base Context implementation. Multiple cell's could be added.
Methods
impl<A> ContextImpl<A> where
A: Actor,
A::Context: AsyncContext<A>,
[src]
A: Actor,
A::Context: AsyncContext<A>,
fn new(act: Option<A>) -> ContextImpl<A>
[src]
fn with_receiver(act: Option<A>, rx: SyncAddressReceiver<A>) -> Self
[src]
fn actor(&mut self) -> &mut A
[src]
Mutable reference to an actor.
It panics if actor is not set
fn modify(&mut self)
[src]
Mark context as modified, this cause extra poll loop over all items
fn waiting(&self) -> bool
[src]
Is context waiting for future completion
fn stop(&mut self)
[src]
Initiate stop process for actor execution
Actor could prevent stopping by returning false
from Actor::stopping()
method.
fn terminate(&mut self)
[src]
Terminate actor execution
fn state(&self) -> ActorState
[src]
Actor execution state
fn curr_handle(&self) -> SpawnHandle
[src]
Handle of the running future
fn spawn<F>(&mut self, fut: F) -> SpawnHandle where
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static,
[src]
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static,
Spawn new future to this context.
fn wait<F>(&mut self, f: F) where
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static,
[src]
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static,
Spawn new future to this context and wait future completion.
During wait period actor does not receive any messages.
fn cancel_future(&mut self, handle: SpawnHandle) -> bool
[src]
Cancel previously scheduled future.
fn capacity(&mut self) -> usize
[src]
fn set_mailbox_capacity(&mut self, cap: usize)
[src]
fn unsync_address(&mut self) -> Addr<Unsync, A>
[src]
fn sync_address(&mut self) -> Addr<Syn, A>
[src]
fn alive(&self) -> bool
[src]
fn restart(&mut self, ctx: &mut A::Context) -> bool where
A: Supervised,
[src]
A: Supervised,
Restart context. Cleanup all futures, except address queue.