Component

Trait Component 

Source
pub trait Component: Send + 'static {
    // Required methods
    fn spawn(self, executor: TaskExecutor) -> Result<()>
       where Self: Sized;
    fn name(&self) -> &'static str;

    // Provided method
    fn check_readiness(&self) -> Result<()> { ... }
}
Expand description

A component is a long-running task that processes data

Required Methods§

Source

fn spawn(self, executor: TaskExecutor) -> Result<()>
where Self: Sized,

Spawn the component’s tasks using the provided executor

Source

fn name(&self) -> &'static str

Name of the component for logging

Provided Methods§

Source

fn check_readiness(&self) -> Result<()>

Check if component is ready to start (optional validation)

Implementors§