Job

Trait Job 

Source
pub trait Job {
    type Output;

    // Required method
    fn run(&mut self, timeout: Duration) -> Result<Self::Output, NanonisError>;
}
Expand description

A trait for long-running processes that can succeed, fail, or timeout

Jobs represent autonomous processes like tip controllers, scanning operations, monitoring loops, or any other task that runs for a duration and produces a result.

Required Associated Types§

Source

type Output

The type returned on successful completion

Required Methods§

Source

fn run(&mut self, timeout: Duration) -> Result<Self::Output, NanonisError>

Run the job with a timeout

Returns:

  • Ok(output) if the job completes successfully
  • Err(NanonisError) if the job fails or times out

Implementors§