pub trait HasPermission<Context>: Send + Sync {
type Error;
// Required method
fn has_permission(
&self,
context: &Context,
) -> impl Future<Output = Result<bool, Self::Error>> + Send;
// Provided methods
fn and<R>(self, right: R) -> And<Self, R>
where Self: Sized,
R: HasPermission<Context, Error = Self::Error> { ... }
fn or<R>(self, right: R) -> Or<Self, R>
where Self: Sized,
R: HasPermission<Context, Error = Self::Error> { ... }
}Required Associated Types§
Required Methods§
fn has_permission( &self, context: &Context, ) -> impl Future<Output = Result<bool, Self::Error>> + Send
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".