Struct theatre::ActorHandle [−][src]
ActorHandle is a method of await
ing the actor’s task. Dropping the ActorHandle will not
shutdown the actor.
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
Auto Trait Implementations
impl !RefUnwindSafe for ActorHandle
impl Send for ActorHandle
impl Sync for ActorHandle
impl Unpin for ActorHandle
impl !UnwindSafe for ActorHandle
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>,