Struct actix::dev::ContextParts [−][src]
pub struct ContextParts<A> where
A: Actor,
A::Context: AsyncContext<A>, { /* fields omitted */ }Methods
impl<A> ContextParts<A> where
A: Actor,
A::Context: AsyncContext<A>, [src]
impl<A> ContextParts<A> where
A: Actor,
A::Context: AsyncContext<A>, pub fn new(addr: AddressSenderProducer<A>) -> Self[src]
pub fn new(addr: AddressSenderProducer<A>) -> SelfCreate new ContextParts instance
pub fn stop(&mut self)[src]
pub fn stop(&mut self)Initiate stop process for actor execution
Actor could prevent stopping by returning false from
Actor::stopping() method.
pub fn terminate(&mut self)[src]
pub fn terminate(&mut self)Terminate actor execution
pub fn state(&self) -> ActorState[src]
pub fn state(&self) -> ActorStateActor execution state
pub fn waiting(&self) -> bool[src]
pub fn waiting(&self) -> boolIs context waiting for future completion
pub fn curr_handle(&self) -> SpawnHandle[src]
pub fn curr_handle(&self) -> SpawnHandleHandle of the running future
pub fn spawn<F>(&mut self, fut: F) -> SpawnHandle where
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static, [src]
pub fn spawn<F>(&mut self, fut: F) -> SpawnHandle where
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static, Spawn new future to this context.
pub fn wait<F>(&mut self, f: F) where
F: ActorFuture<Item = (), Error = (), Actor = A> + 'static, [src]
pub fn wait<F>(&mut self, f: F) where
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.
pub fn cancel_future(&mut self, handle: SpawnHandle) -> bool[src]
pub fn cancel_future(&mut self, handle: SpawnHandle) -> boolCancel previously scheduled future.
pub fn capacity(&mut self) -> usize[src]
pub fn capacity(&mut self) -> usizepub fn set_mailbox_capacity(&mut self, cap: usize)[src]
pub fn set_mailbox_capacity(&mut self, cap: usize)pub fn address(&self) -> Addr<A>[src]
pub fn address(&self) -> Addr<A>pub fn started(&mut self) -> bool[src]
pub fn started(&mut self) -> boolAuto Trait Implementations
impl<A> !Send for ContextParts<A>
impl<A> !Send for ContextParts<A>impl<A> !Sync for ContextParts<A>
impl<A> !Sync for ContextParts<A>