Struct actix::dev::ContextParts[][src]

pub struct ContextParts<A> where
    A: Actor,
    A::Context: AsyncContext<A>, 
{ /* fields omitted */ }

Implementations

impl<A> ContextParts<A> where
    A: Actor,
    A::Context: AsyncContext<A>, 
[src]

pub fn new(addr: AddressSenderProducer<A>) -> Self[src]

Create new ContextParts instance

pub fn stop(&mut self)[src]

Initiate stop process for actor execution

Actor could prevent stopping by returning false from Actor::stopping() method.

pub fn terminate(&mut self)[src]

Terminate actor execution

pub fn state(&self) -> ActorState[src]

Actor execution state

pub fn waiting(&self) -> bool[src]

Is context waiting for future completion

pub fn curr_handle(&self) -> SpawnHandle[src]

Handle of the running future

pub fn spawn<F>(&mut self, fut: F) -> SpawnHandle where
    F: ActorFuture<A, Output = ()> + 'static, 
[src]

Spawn new future to this context.

pub fn wait<F>(&mut self, f: F) where
    F: ActorFuture<A, Output = ()> + 'static, 
[src]

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]

Cancel previously scheduled future.

pub fn capacity(&mut self) -> usize[src]

pub fn set_mailbox_capacity(&mut self, cap: usize)[src]

pub fn address(&self) -> Addr<A>[src]

pub fn started(&mut self) -> bool[src]

pub fn connected(&self) -> bool[src]

Are any senders connected

Trait Implementations

impl<A> Debug for ContextParts<A> where
    A: Actor,
    A::Context: AsyncContext<A>, 
[src]

Auto Trait Implementations

impl<A> !RefUnwindSafe for ContextParts<A>

impl<A> !Send for ContextParts<A>

impl<A> !Sync for ContextParts<A>

impl<A> Unpin for ContextParts<A>

impl<A> !UnwindSafe for ContextParts<A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.