Struct actix::FramedContext [] [src]

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

Actor execution context for Framed object

Methods

impl<A> FramedContext<A> where
    A: Actor<Context = Self> + FramedActor
[src]

[src]

Send item to sink. If sink is closed item returned as an error.

[src]

Gracefully close Framed object. FramedContext will try to send all buffered items and then close. FramedContext::stop() could be used to force stop sending process.

[src]

Initiate sink drain

Returns oneshot future. It resolves when sink is drained. All other actor activities are paused.

[src]

Get inner framed object

[src]

Replace existing framed object with new object.

Consider to use drain() before replace framed object, because Sink buffer get dropped as well.

Trait Implementations

impl<A> ToEnvelope<A> for FramedContext<A> where
    A: FramedActor + Actor<Context = FramedContext<A>>, 
[src]

[src]

Pack message into suitable envelope

impl<A> ActorContext for FramedContext<A> where
    A: Actor<Context = Self> + FramedActor
[src]

[src]

Gracefully stop actor execution

[src]

Terminate actor execution

[src]

Actor execution state

[src]

Check if execution context is alive

impl<A> AsyncContext<A> for FramedContext<A> where
    A: Actor<Context = Self> + FramedActor
[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]

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

[src]

Get actor address

[src]

This method allow to handle Future in similar way as normal actor messages. Read more

[src]

This method is similar to add_future but works with streams. Read more

[src]

This method is similar to add_stream but it skips errors.

[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> AsyncContextApi<A> for FramedContext<A> where
    A: Actor<Context = Self> + FramedActor
[src]

[src]

[src]

[src]

impl<A> Debug for FramedContext<A> where
    A: Actor<Context = Self> + FramedActor
[src]

[src]

Formats the value using the given formatter.