pub trait TaskHandler<Payload, Context>: Send{
// Required method
fn run(
&self,
payload: Payload,
ctx: Context,
) -> impl Future<Output = Result<(), String>> + Send + 'static;
// Provided method
fn identifier(&self) -> &str { ... }
}Required Methods§
fn run( &self, payload: Payload, ctx: Context, ) -> impl Future<Output = Result<(), String>> + Send + 'static
Provided Methods§
fn identifier(&self) -> &str
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.