mirror of
https://codeberg.org/JasterV/transactions-processor.git
synced 2026-04-26 18:10:06 +00:00
13 lines
No EOL
244 B
Rust
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>;
|
|
} |