15 lines
360 B
Rust
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>;
|
|
}
|