pub trait PathPredicate: Sized {
// Required method
fn path(self, resource: String) -> Path<Self>;
}Expand description
Extension trait for adding path matching to a predicate chain.
§For Callers
Chain this to match requests by their URL path. The path is matched
against an actix-router pattern supporting
dynamic segments like {id} and wildcards like {tail}*.
§For Implementors
This trait is automatically implemented for all Predicate
types. You don’t need to implement it manually.
Required Methods§
Sourcefn path(self, resource: String) -> Path<Self>
fn path(self, resource: String) -> Path<Self>
Adds a path pattern match to this predicate chain.
The pattern is compiled into a ResourceDef.
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.