Enum tor_config::CfgPathError
source · #[non_exhaustive]pub enum CfgPathError {
UnknownVar(String),
NoProjectDirs,
NoBaseDirs,
NoProgramPath,
BadUtf8(String),
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.
BadUtf8(String)
We couldn’t convert a variable to UTF-8.
(This is due to a limitation in the shellexpand crate, which should be fixed in the future.)
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)>
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()
Auto Trait Implementations§
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