#![doc = include_str!("README.md")]
pub mod commander;
pub mod progress;
pub mod repository;
pub mod runner;
pub use self::runner::simple::Simple;
use self::{progress::Progress, repository::JobRepository};
use crate::job::JobId;
use commander::Instance;
use futures_lite::Stream;
use core::{future::Future, pin::Pin};
pub type BoxInstance = Box<dyn Instance + Send>;
pub type BoxError = Box<dyn core::error::Error + Sync + Send>;
pub type BoxStream<'s, T> = Pin<Box<dyn 's + Stream<Item = T> + Send>>;
pub type BoxFuture<'f, T> = Pin<Box<dyn 'f + Future<Output = T> + Send>>;
pub trait Runner {
fn run<'f, 'j: 'f, J: 'j + JobRepository + Send + Unpin>(
&self,
jobs: J,
goals: &[Box<str>],
) -> BoxStream<'f, (JobId, Progress)>;
}