pub type PathElement<'a> = PathElementGeneric<'a, CaseSensitivity>;Expand description
A validated, normalized single path element with runtime-selected case sensitivity.
Takes a raw path element name, validates it (rejecting empty strings, ., ..,
strings containing / or \0, and unassigned Unicode characters), normalizes it, and computes an OS-compatible
presentation form.
Case sensitivity is chosen at construction time via the CaseSensitivity enum.
Does not implement Hash because elements with different
sensitivities must not share a hash map. Comparing or ordering elements with
different sensitivities will panic. Use PathElementCS or PathElementCI
when the sensitivity is known at compile time.
Aliased Type§
pub struct PathElement<'a> { /* private fields */ }Trait Implementations§
Source§impl<'a> From<PathElementGeneric<'a, CaseInsensitive>> for PathElement<'a>
Converts a compile-time case-insensitive element into a runtime-dynamic PathElement.
impl<'a> From<PathElementGeneric<'a, CaseInsensitive>> for PathElement<'a>
Converts a compile-time case-insensitive element into a runtime-dynamic PathElement.
Source§fn from(pe: PathElementCI<'a>) -> Self
fn from(pe: PathElementCI<'a>) -> Self
Source§impl<'a> From<PathElementGeneric<'a, CaseSensitive>> for PathElement<'a>
Converts a compile-time case-sensitive element into a runtime-dynamic PathElement.
impl<'a> From<PathElementGeneric<'a, CaseSensitive>> for PathElement<'a>
Converts a compile-time case-sensitive element into a runtime-dynamic PathElement.