Struct actix::dev::ContextParts [−][src]
Implementations
impl<A> ContextParts<A> where
A: Actor,
A::Context: AsyncContext<A>,
[src]
A: Actor,
A::Context: AsyncContext<A>,
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]
F: ActorFuture<A, Output = ()> + 'static,
Spawn new future to this context.
pub fn wait<F>(&mut self, f: F) where
F: ActorFuture<A, Output = ()> + 'static,
[src]
F: ActorFuture<A, Output = ()> + '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]
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]
A: Actor,
A::Context: AsyncContext<A>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,