[−][src]Struct actix_web::actix::dev::ContextParts
Methods
impl<A> ContextParts<A> where
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
[src]
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
pub fn new(addr: AddressSenderProducer<A>) -> ContextParts<A>
[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<Item = (), Error = (), Actor = A> + 'static,
[src]
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]
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]
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]
Trait Implementations
impl<A> Debug for ContextParts<A> where
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
[src]
A: Actor,
<A as Actor>::Context: AsyncContext<A>,
Auto Trait Implementations
impl<A> !Send for ContextParts<A>
impl<A> !Sync for ContextParts<A>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.