transactions-processor/src/models/actor.rs
2021-07-29 19:12:08 +02:00

13 lines
No EOL
244 B
Rust

use anyhow::Result;
pub trait Actor<T> {
type Output;
fn handle(&mut self, cmd: T) -> Result<Self::Output>;
}
#[async_trait]
pub trait AsyncActor<T> {
type Output;
async fn handle(&mut self, cmd: T) -> Result<Self::Output>;
}