pub trait Job {
// Required methods
fn encode(&self) -> Vec<u8> ⓘ;
fn decode(input: &[u8]) -> Self;
fn ack(&self) -> Vec<u8> ⓘ;
fn run(&self) -> Result<(), Box<dyn Error>>;
}Expand description
The core trait Job providing required methods to user-defined data types for
orchestrating task execution.
It is left to the implementor to ensure these methods do not panic or that errors are handled as they see fit.
Required Methods§
fn encode(&self) -> Vec<u8> ⓘ
fn decode(input: &[u8]) -> Self
fn ack(&self) -> Vec<u8> ⓘ
fn run(&self) -> Result<(), Box<dyn Error>>
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.