pub trait TestEnv: Sized {
type Config: BlueprintConfig;
type Context: Clone + Send + Sync + 'static;
// Required methods
fn new(
config: Self::Config,
env: BlueprintEnvironment,
) -> Result<Self, RunnerError>;
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<(), RunnerError>> + Send;
}
Required Associated Types§
Required Methods§
Sourcefn new(
config: Self::Config,
env: BlueprintEnvironment,
) -> Result<Self, RunnerError>
fn new( config: Self::Config, env: BlueprintEnvironment, ) -> Result<Self, RunnerError>
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
Sourcefn run_runner(
&mut self,
context: Self::Context,
) -> impl Future<Output = Result<(), RunnerError>> + Send
fn run_runner( &mut self, context: Self::Context, ) -> impl Future<Output = Result<(), RunnerError>> + Send
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.