pub trait JobExt: Job + Serialize {
// Provided method
fn dispatch<'a>(
&'a self,
env: &'a Env,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'a>> { ... }
}Expand description
Extension trait that adds dispatch() to any Job implementor.
This is separate from the Job trait because typetag needs
Job to be object-safe, and dispatch requires Serialize.
Provided Methods§
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.