Skip to main content

validate_path_segment

Function validate_path_segment 

Source
pub fn validate_path_segment(segment: &str, what: &str) -> Result<String>
Expand description

Validates that a string is safe to use as a single path segment (e.g. an id or file stem).

Returns the trimmed segment on success.