pub struct ExpandOptions {
pub expand_tilde: bool,
pub expand_percent_variables: bool,
pub expand_dollar_variables: bool,
pub translate_wsl_paths: bool,
pub reject_undefined_variables: bool,
pub trim_cli_input: bool,
pub max_expansion_depth: u32,
}Expand description
Options controlling how user path input is expanded.
§Defaults
- Expand
~at the start of the path - Expand
%VAR%and$VAR/${VAR} - Reject undefined variables
- Trim surrounding whitespace
- Do not translate WSL
/mnt/<drive>/...paths
Fields§
§expand_tilde: boolExpand a leading ~ or ~/ / ~\ to the home directory.
expand_percent_variables: boolExpand %VAR% style variables (generic; works on any platform if set).
expand_dollar_variables: boolExpand $VAR and ${VAR} style variables.
translate_wsl_paths: boolTranslate /mnt/<drive>/... to a Windows path when applicable.
reject_undefined_variables: boolWhen true, undefined variables produce an error; when false, they are left unchanged.
trim_cli_input: boolTrim leading and trailing whitespace from the input.
max_expansion_depth: u32Maximum nested expansion passes (defensive limit).
Implementations§
Trait Implementations§
Source§impl Clone for ExpandOptions
impl Clone for ExpandOptions
Source§fn clone(&self) -> ExpandOptions
fn clone(&self) -> ExpandOptions
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 moreSource§impl Debug for ExpandOptions
impl Debug for ExpandOptions
Source§impl Default for ExpandOptions
impl Default for ExpandOptions
impl Eq for ExpandOptions
Source§impl PartialEq for ExpandOptions
impl PartialEq for ExpandOptions
impl StructuralPartialEq for ExpandOptions
Auto Trait Implementations§
impl Freeze for ExpandOptions
impl RefUnwindSafe for ExpandOptions
impl Send for ExpandOptions
impl Sync for ExpandOptions
impl Unpin for ExpandOptions
impl UnsafeUnpin for ExpandOptions
impl UnwindSafe for ExpandOptions
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