pub trait JobArgs: Serialize {
// Required method
fn kind() -> &'static str
where Self: Sized;
// Provided methods
fn kind_str(&self) -> &'static str
where Self: Sized { ... }
fn to_args(&self) -> Result<Value, Error> { ... }
}Expand description
Trait for typed job arguments.
Implement this trait (or use #[derive(JobArgs)]) to define a job type.
The kind() method returns the snake_case kind string that identifies
this job type across languages.
Required Methods§
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.