pub struct WorkerActor { /* private fields */ }Implementations§
Source§impl WorkerActor
impl WorkerActor
Trait Implementations§
Source§impl Actor for WorkerActor
impl Actor for WorkerActor
type Msg = WorkerMsg
Source§fn pre_start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pre_start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once before the first message.
Source§fn supervisor_strategy(&self) -> SupervisorStrategy
fn supervisor_strategy(&self) -> SupervisorStrategy
The supervisor strategy this actor applies to its own children.
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
msg: Self::Msg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
msg: Self::Msg,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a single message.
Source§fn post_stop<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn post_stop<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Called after the actor has been stopped.
Source§fn pre_restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_err: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn pre_restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_err: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when the actor is about to be restarted by the supervisor.
Source§fn post_restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_err: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn post_restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_err: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called after a restart.
Source§fn on_terminated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_path: &'life2 ActorPath,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_terminated<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>,
_path: &'life2 ActorPath,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when a watched actor terminates. The
path argument is
the path of the actor that just stopped. Default is a no-op.
Implementations may translate this into a user-visible message
(the Python binding does this for Terminated events).Auto Trait Implementations§
impl Freeze for WorkerActor
impl !RefUnwindSafe for WorkerActor
impl Send for WorkerActor
impl Sync for WorkerActor
impl Unpin for WorkerActor
impl UnsafeUnpin for WorkerActor
impl !UnwindSafe for WorkerActor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more