shifty-backend/service/src/user_service.rs
2024-05-09 15:00:50 +02:00

15 lines
360 B
Rust

use std::fmt::Debug;
use std::sync::Arc;
use async_trait::async_trait;
use mockall::automock;
use crate::ServiceError;
#[automock(type Context=();)]
#[async_trait]
pub trait UserService {
type Context: Clone + Debug + PartialEq + Eq + Send + Sync + 'static;
async fn current_user(&self, context: Self::Context) -> Result<Arc<str>, ServiceError>;
}