#[non_exhaustive]pub enum CfgPathError {
UnknownVar(String),
NoProjectDirs,
NoBaseDirs,
NoProgramPath,
NoProgramDir,
InvalidString(String),
VariableInterpolationNotSupported(String),
HomeDirInterpolationNotSupported(String),
}
Expand description
An error that has occurred while expanding a path.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownVar(String)
The path contained a variable we didn’t recognize.
NoProjectDirs
We couldn’t construct a ProjectDirs object.
NoBaseDirs
We couldn’t construct a BaseDirs object.
NoProgramPath
We couldn’t find our current binary path.
NoProgramDir
We couldn’t find the directory path containing the current binary.
InvalidString(String)
We couldn’t convert a string to a valid path on the OS.
VariableInterpolationNotSupported(String)
Variable interpolation ($
) attempted, but not compiled in
HomeDirInterpolationNotSupported(String)
Home dir interpolation (~
) attempted, but not compiled in
Trait Implementations§
Source§impl Clone for CfgPathError
impl Clone for CfgPathError
Source§fn clone(&self) -> CfgPathError
fn clone(&self) -> CfgPathError
Returns a copy of the value. Read more
1.0.0 · 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 CfgPathError
impl Debug for CfgPathError
Source§impl Display for CfgPathError
impl Display for CfgPathError
Source§impl Error for CfgPathError
impl Error for CfgPathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<CfgPathError> for CfgAddrError
Available on crate feature address
only.
impl From<CfgPathError> for CfgAddrError
Available on crate feature
address
only.Source§fn from(source: CfgPathError) -> Self
fn from(source: CfgPathError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CfgPathError
impl RefUnwindSafe for CfgPathError
impl Send for CfgPathError
impl Sync for CfgPathError
impl Unpin for CfgPathError
impl UnwindSafe for CfgPathError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> ErrorReport for Ewhere
E: Error + 'static,
impl<E> ErrorReport for Ewhere
E: Error + 'static,
Source§fn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
Return an object that displays the error and its causes