[−][src]Struct actix::Context
An actor execution context.
Methods
impl<A> Context<A> where
A: Actor<Context = Self>,
[src]
impl<A> Context<A> where
A: Actor<Context = Self>,
pub fn with_receiver(rx: AddressReceiver<A>) -> Context<A> | [src] |
pub fn run(self, act: A) -> Addr<A> | [src] |
pub fn into_future(self, act: A) -> ContextFut<A, Self> | [src] |
pub fn handle(&self) -> SpawnHandle | [src] |
Returns a handle to the running future.
This is the handle returned by the AsyncContext::spawn()
method.
pub fn set_mailbox_capacity(&mut self, cap: usize) | [src] |
Sets the mailbox capacity.
The default mailbox capacity is 16 messages.
Trait Implementations
impl<A> ActorContext for Context<A> where
A: Actor<Context = Self>,
[src]
impl<A> ActorContext for Context<A> where
A: Actor<Context = Self>,
impl<A> AsyncContext<A> for Context<A> where
A: Actor<Context = Self>,
[src]
impl<A> AsyncContext<A> for Context<A> where
A: Actor<Context = Self>,
fn spawn<F>(&mut self, fut: F) -> SpawnHandle where | [src] |
fn wait<F>(&mut self, fut: F) where | [src] |
fn waiting(&self) -> bool | [src] |
fn cancel_future(&mut self, handle: SpawnHandle) -> bool | [src] |
fn address(&self) -> Addr<A> | [src] |
fn add_stream<S>(&mut self, fut: S) -> SpawnHandle where | [src] |
Registers a stream with the context. Read more
fn add_message_stream<S>(&mut self, fut: S) where | [src] |
Registers a stream with the context, ignoring errors. Read more
fn notify<M>(&mut self, msg: M) where | [src] |
Sends the message msg
to self.
fn notify_later<M>(&mut self, msg: M, after: Duration) -> SpawnHandle where | [src] |
Sends the message msg
to self after a specified period of time. Read more
fn run_later<F>(&mut self, dur: Duration, f: F) -> SpawnHandle where | [src] |
Executes a closure after a specified period of time. Read more
fn run_interval<F>(&mut self, dur: Duration, f: F) -> SpawnHandle where | [src] |
Spawns a job to execute the given closure periodically, at a specified fixed interval. Read more
impl<A> AsyncContextParts<A> for Context<A> where
A: Actor<Context = Self>,
[src]
impl<A> AsyncContextParts<A> for Context<A> where
A: Actor<Context = Self>,
fn parts(&mut self) -> &mut ContextParts<A> | [src] |
impl<A, M> ToEnvelope<A, M> for Context<A> where
A: Actor<Context = Context<A>> + Handler<M>,
M: Message + Send + 'static,
M::Result: Send,
[src]
impl<A, M> ToEnvelope<A, M> for Context<A> where
A: Actor<Context = Context<A>> + Handler<M>,
M: Message + Send + 'static,
M::Result: Send,
impl<A: Actor<Context = Context<A>>> Debug for Context<A>
[src]
impl<A: Actor<Context = Context<A>>> Debug for Context<A>
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T