pub trait AccessExt<P, HI>: Sized {
// Provided method
fn with_access_policy(
self,
policy: P,
) -> Predicate<AccessPredicate<P>, HandlerInput, Self, HI> { ... }
}
Available on crate feature
access
only.Expand description
Provides a shortcut for wrapping a Handler
by an AccessPredicate
.
Provided Methods§
Sourcefn with_access_policy(
self,
policy: P,
) -> Predicate<AccessPredicate<P>, HandlerInput, Self, HI>
fn with_access_policy( self, policy: P, ) -> Predicate<AccessPredicate<P>, HandlerInput, Self, HI>
Shortcut to wrap a Handler
with an access predicate.
Example: let handler = handler.access(policy)
.
§Arguments
policy
- Acrate::access::AccessPolicy
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.