pub trait SingleTerminate: Send + Sync {
// Required method
fn terminate_proc<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
proc: &'life2 ProcId,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(Vec<ActorId>, Vec<ActorId>), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for terminating a single proc.
Required Methods§
Sourcefn terminate_proc<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
proc: &'life2 ProcId,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(Vec<ActorId>, Vec<ActorId>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn terminate_proc<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
proc: &'life2 ProcId,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(Vec<ActorId>, Vec<ActorId>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gracefully terminate the given proc.
Initiates a polite shutdown for each child, waits up to
timeout for completion, then escalates to a forceful stop
The returned TerminateSummary reports how
many children were attempted, succeeded, and failed.
Implementation notes:
- “Polite shutdown” and “forceful stop” are intentionally abstract. Implementors should map these to whatever semantics they control (e.g., proc-level drain/abort, RPCs, OS signals).
- The operation must be idempotent and tolerate races with concurrent termination or external exits.
§Parameters
timeout: Per-child grace period before escalation to a forceful stop. Returns a tuple of (polite shutdown actors vec, forceful stop actors vec)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.