Job

Trait Job 

Source
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§

Source

fn encode(&self) -> Vec<u8>

Source

fn decode(input: &[u8]) -> Self

Source

fn ack(&self) -> Vec<u8>

Source

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.

Implementors§