pub type PathElementCI<'a> = PathElementGeneric<'a, CaseInsensitive>;Expand description
A validated, normalized, case-insensitive single path element.
Takes a raw path element name, validates it (rejecting empty strings, ., ..,
strings containing / or \0, and unassigned Unicode characters), normalizes it case-insensitively, and computes
an OS-compatible presentation form.
Equality, ordering, and hashing are based on the normalized (case-folded) form.
"Hello.txt" and "hello.txt" are equal.
Implements Hash.
Aliased Type§
pub struct PathElementCI<'a> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Hash for PathElementCI<'_>
Hashes by normalized(), consistent with PartialEq. Only
implemented for typed variants, not PathElement.
impl Hash for PathElementCI<'_>
Hashes by normalized(), consistent with PartialEq. Only
implemented for typed variants, not PathElement.
Source§impl<'a> TryFrom<PathElementGeneric<'a, CaseSensitivity>> for PathElementCI<'a>
Attempts to convert a runtime-dynamic PathElement into a PathElementCI.
impl<'a> TryFrom<PathElementGeneric<'a, CaseSensitivity>> for PathElementCI<'a>
Attempts to convert a runtime-dynamic PathElement into a PathElementCI.
Succeeds if the element is case-insensitive. On failure, returns the element
re-wrapped as a PathElementCS in the Err variant (no data is lost).
Source§type Error = PathElementGeneric<'a, CaseSensitive>
type Error = PathElementGeneric<'a, CaseSensitive>
The type returned in the event of a conversion error.