nitinol-process 0.1.0

Pseudo-actor type process library for Nitinol using green thread of tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod event;
mod command;
mod forget;

pub use self::event::*;
pub use self::command::*;
pub use self::forget::*;

use async_trait::async_trait;

use crate::{Process, Context};
use crate::errors::ChannelDropped;

#[async_trait]
pub trait ProcessApplier<T: Process>: 'static + Sync + Send {
    async fn apply(self: Box<Self>, entity: &mut T, ctx: &mut Context) -> Result<(), ChannelDropped>;
}