pub trait Checker {
// Required method
fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 mut ServiceRequest,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Available on crate feature
router only.Expand description
Per-route permission checker.
Return Ok(false) to reject the request with 403; an Err yields 500. ?Send is
required because actix runs each worker single-threaded.
Required Methods§
fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 mut ServiceRequest,
) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".