Runnable

Trait Runnable 

Source
pub trait Runnable
where Self: Send + Sync + 'static,
{ // Required methods fn process_start(&self) -> ProcFuture<'_>; fn process_handle(&self) -> Arc<dyn ProcessControlHandler>; // Provided method fn process_name(&self) -> Cow<'static, str> { ... } }
Expand description

A long-running asynchronous component managed by the ProcessManager.

Required Methods§

Source

fn process_start(&self) -> ProcFuture<'_>

Start the component. The returned future resolves when the process ends (normally or in error).

Source

fn process_handle(&self) -> Arc<dyn ProcessControlHandler>

Obtain a handle for shutdown / reload signalling.

Provided Methods§

Source

fn process_name(&self) -> Cow<'static, str>

Human-readable name, used for logging only.

Implementations on Foreign Types§

Source§

impl<R> Runnable for Arc<R>
where R: Runnable + ?Sized,

Implementors§