Skip to main content

pattern_matches

Function pattern_matches 

Source
pub fn pattern_matches(pattern: &str, path: &str) -> bool
Expand description

Returns whether a route pattern matches a request path using bounded segments.

§Parameters

§Returns

Returns true when the condition checked by crate::runtime::dynamic::pattern_matches holds and false otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::dynamic::pattern_matches.

§Examples

ⓘ
let _result = pharos_native::runtime::dynamic::pattern_matches(todo!(), std::path::Path::new("fixture.json"));