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
.
Object Safety§
This trait is not object safe.