Struct theatre::ActorHandle[][src]

pub struct ActorHandle { /* fields omitted */ }

ActorHandle is a method of awaiting the actor’s task. Dropping the ActorHandle will not shutdown the actor.

#ActorHandle

Implementations

impl ActorHandle[src]

pub fn shutdown(&mut self) -> Result<(), TheatreError>[src]

Shutdown the actor

pub async fn join(self) -> Result<(), JoinError>[src]

Calling join() will await the actor until it has shutdown.

pub async fn heartbeat(&mut self) -> bool[src]

Send a heartbeat message to the actor. The actor will response as soon as it can. This method returns true if the actor is still running or false if the actor has shutdown.

Trait Implementations

impl Debug for ActorHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.