1
2
3
4
5
6
7
8
9
10
11
12
13
use async_trait::async_trait;

use crate::prelude::{ApplicationError, ApplicationResponse, TCommand};

#[async_trait]
pub trait TCommandService<R, E, C>: Send + Sync
where
	R: ApplicationResponse,
	E: ApplicationError,
	C: TCommand,
{
	async fn execute(&mut self, cmd: C) -> Result<R, E>;
}