pub trait AccessPolicy:
Send
+ Sync
+ 'static {
// Required method
fn check<'a>(
&'a self,
owner: &'a AgentId,
) -> Pin<Box<dyn Future<Output = Access> + Send + 'a>>;
}Expand description
A pluggable admission check. Implementations should answer quickly (the check runs on every request) and cache lookups as they see fit.
Required Methods§
fn check<'a>( &'a self, owner: &'a AgentId, ) -> Pin<Box<dyn Future<Output = Access> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".