#[cfg(feature = "async")]
use crate::future::BoxFuture;
#[cfg(test)]
use mockall::automock;
use springtime_di::injectable;
pub use springtime_di::instance_provider::ErrorPtr;
#[cfg(feature = "threadsafe")]
pub type ApplicationRunnerPtr = dyn ApplicationRunner + Send + Sync;
#[cfg(not(feature = "threadsafe"))]
pub type ApplicationRunnerPtr = dyn ApplicationRunner;
#[injectable]
#[cfg_attr(test, automock)]
pub trait ApplicationRunner {
#[cfg(feature = "async")]
fn run(&self) -> BoxFuture<'_, Result<(), ErrorPtr>>;
#[cfg(not(feature = "async"))]
fn run(&self) -> Result<(), ErrorPtr>;
fn priority(&self) -> i8 {
0
}
}