pub trait Guard {
// Required method
fn check(&self, ctx: &GuardContext<'_>) -> bool;
}Expand description
Interface for routing guards.
See module level documentation for more.
Required Methods§
Sourcefn check(&self, ctx: &GuardContext<'_>) -> bool
fn check(&self, ctx: &GuardContext<'_>) -> bool
Returns true if predicate condition is met for a given request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".