pub trait TestEnv: Sized {
type Config: BlueprintConfig;
type Context: Clone + Send + Sync + 'static;
// Required methods
fn new(
config: Self::Config,
env: BlueprintEnvironment,
) -> Result<Self, Error>;
fn add_job<J, T>(&mut self, job: J)
where J: Job<T, Self::Context> + Send + Sync + 'static,
T: 'static;
fn add_background_service<B>(&mut self, service: B)
where B: BackgroundService + Send + 'static;
fn get_blueprint_config(&self) -> BlueprintEnvironment;
fn run_runner(
&mut self,
context: Self::Context,
) -> impl Future<Output = Result<(), Error>> + Send;
}
Required Associated Types§
Required Methods§
fn add_job<J, T>(&mut self, job: J)
fn add_background_service<B>(&mut self, service: B)where
B: BackgroundService + Send + 'static,
fn get_blueprint_config(&self) -> BlueprintEnvironment
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.