Skip to main content

apply_rules

Function apply_rules 

Source
pub fn apply_rules(rules: &[PathMappingRule], path: &str) -> String
Expand description

Apply a list of path mapping rules to a path. First match wins.

Rules must be pre-sorted by decreasing source_path length (longest match first). The session layer handles this sorting; see Session::new().