archimedes_task_handler 0.2.0

A library to handle tasks for the Archimedes project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use serde::{Deserialize, Serialize};

use crate::handler::TaskHandler;

pub trait TaskDefinition<Context>
where
    Context: Send,
{
    type Payload: for<'de> Deserialize<'de> + Serialize + Send + 'static;
    fn get_task_runner(&self) -> impl TaskHandler<Self::Payload, Context> + Clone + 'static;
    fn identifier() -> &'static str;
}