Struct actix::prelude::Context [] [src]

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

Actor execution context

Methods

impl<A> Context<A> where
    A: Actor<Context = Self>, 
[src]

[src]

Handle of the running future

SpawnHandle is the handle returned by AsyncContext::spawn() method.

[src]

Set mailbox capacity

By default mailbox capacity is 16 messages.

Trait Implementations

impl<A> ActorContext for Context<A> where
    A: Actor<Context = Self>, 
[src]

[src]

Immediately stop processing incoming messages and switch to a stopping state Read more

[src]

Terminate actor execution

[src]

Actor execution state

impl<A> AsyncContext<A> for Context<A> where
    A: Actor<Context = Self>, 
[src]

[src]

Spawn async future into context. Returns handle of the item, could be used for cancelling execution. Read more

[src]

Spawn future into the context. Stop processing any of incoming events until this future resolves. Read more

[src]

Check if context is paused (waiting for future completion or stopping)

[src]

Cancel future. idx is a value returned by spawn method.

[src]

Get actor address

[src]

This method register stream to an actor context and allows to handle Stream in similar way as normal actor messages. Read more

[src]

This method is similar to add_stream but it skips stream errors. Read more

[src]

Send message msg to self.

[src]

Send message msg to self after specified period of time. Returns spawn handle which could be used for cancellation. Notification get cancelled if context's stop method get called. Read more

[src]

Execute closure after specified period of time within same Actor and Context. Execution get cancelled if context's stop method get called. Read more

impl<A> Debug for Context<A> where
    A: Actor<Context = Self>, 
[src]

[src]

Formats the value using the given formatter. Read more

impl<A, M> ToEnvelope<Syn, A, M> for Context<A> where
    A: Actor<Context = Context<A>> + Handler<M>,
    M: Message + Send + 'static,
    M::Result: Send
[src]

[src]

Pack message into suitable envelope

Auto Trait Implementations

impl<A> !Send for Context<A>

impl<A> !Sync for Context<A>