pub struct PathIdentityOptions {
pub normalize_lexically: bool,
pub normalize_separators: bool,
pub case: CaseNormalization,
pub resolve_existing_symlinks: bool,
pub strip_windows_verbatim_prefix: bool,
pub translate_wsl_paths: bool,
}Expand description
Options controlling how a path identity key is produced.
§Defaults
- Lexical normalize
- Normalize separators to
/ - Platform default case (lowercase on Windows, preserve on Unix)
- Do not resolve symlinks
- Do not strip Windows verbatim prefixes
- Do not translate WSL paths
Fields§
§normalize_lexically: boolApply lexical crate::normalize before keying.
normalize_separators: boolNormalize path separators to / in the key string.
case: CaseNormalizationCase policy for the key.
resolve_existing_symlinks: boolWhen true, attempt canonicalize if the path exists (resolves symlinks).
Failed canonicalize falls back to the lexical form.
strip_windows_verbatim_prefix: boolWhen true, simplify Windows verbatim prefixes via dunce for the key.
translate_wsl_paths: boolWhen true and the path looks like /mnt/<drive>/..., translate to Windows form first.
Implementations§
Trait Implementations§
Source§impl Clone for PathIdentityOptions
impl Clone for PathIdentityOptions
Source§fn clone(&self) -> PathIdentityOptions
fn clone(&self) -> PathIdentityOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PathIdentityOptions
Source§impl Debug for PathIdentityOptions
impl Debug for PathIdentityOptions
Source§impl Default for PathIdentityOptions
impl Default for PathIdentityOptions
impl Eq for PathIdentityOptions
Source§impl PartialEq for PathIdentityOptions
impl PartialEq for PathIdentityOptions
impl StructuralPartialEq for PathIdentityOptions
Auto Trait Implementations§
impl Freeze for PathIdentityOptions
impl RefUnwindSafe for PathIdentityOptions
impl Send for PathIdentityOptions
impl Sync for PathIdentityOptions
impl Unpin for PathIdentityOptions
impl UnsafeUnpin for PathIdentityOptions
impl UnwindSafe for PathIdentityOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more