pub trait Supervisable: Send + Sync {
// Required method
fn supervision_event<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 Instance<PythonActor>,
) -> Pin<Box<dyn Future<Output = Option<PyErr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for types that can provide supervision events.
This trait abstracts the supervision functionality, allowing endpoint operations to work with any type that can monitor actor health without depending on the full ActorMesh interface.
Required Methods§
Sourcefn supervision_event<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 Instance<PythonActor>,
) -> Pin<Box<dyn Future<Output = Option<PyErr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn supervision_event<'life0, 'life1, 'async_trait>(
&'life0 self,
instance: &'life1 Instance<PythonActor>,
) -> Pin<Box<dyn Future<Output = Option<PyErr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Wait for the next supervision event indicating an actor failure.
Returns Some(PyErr) if a supervision failure is detected,
or None if supervision is not available or the mesh is healthy.