[][src]Trait echoloc::Runnable

pub trait Runnable {
    type Ok;
    type Error: Error;
    fn run(&mut self) -> Result<Self::Ok, Self::Error>;
fn should_retry(&self, error: &Self::Error) -> bool;
fn store_result(&mut self, result: Result<Self::Ok, Self::Error>); }

The Runnable trait for tasks to implement

Associated Types

type Ok

The type of a successful result

type Error: Error

The type of an error

Loading content...

Required methods

fn run(&mut self) -> Result<Self::Ok, Self::Error>

Run the task

fn should_retry(&self, error: &Self::Error) -> bool

Should the task be retried

fn store_result(&mut self, result: Result<Self::Ok, Self::Error>)

Store result

Loading content...

Implementors

impl Runnable for Payload[src]

type Ok = ()

type Error = Err

Loading content...