#[non_exhaustive]pub enum ContainError {
InvalidRelative,
NotAbsolute,
Escapes,
Symlink,
NotAFile,
HardLinked,
Io(Error),
}Expand description
Why a path was refused or could not be resolved.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRelative
rel is empty, absolute, has a root or drive prefix, has a .. component or a NUL byte, or (on
Windows) a name Windows cannot use as a plain component; or a path ends in .. or has a .. in
its not-yet-existing part.
NotAbsolute
An absolute path was required (a Roots method, or a root given to Roots::add).
Escapes
The resolved path is not inside the resolved root (a symlink or junction leads out, the path is outside every approved root, or an approved root was replaced after it was approved).
Symlink
A no-follow open met a symbolic link or reparse point (anywhere, even one that points inside).
NotAFile
A confined open found something that is not a regular file (a directory, a FIFO, a device).
HardLinked
A confined open with ConfinedOptions::require_single_link found a file with more than one
hard link.
Io(Error)
The root, the path, or an entry on the way could not be resolved. This includes a symlink that dangles or loops: its target is unknown, so it is never trusted.
Trait Implementations§
Source§impl Debug for ContainError
impl Debug for ContainError
Source§impl Display for ContainError
impl Display for ContainError
Source§impl Error for ContainError
impl Error for ContainError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ContainError> for Error
An io::Error of the kind a std::io caller expects: InvalidInput for a malformed path or a
link, PermissionDenied for an escape or a hard link; an ContainError::Io keeps its own error.
impl From<ContainError> for Error
An io::Error of the kind a std::io caller expects: InvalidInput for a malformed path or a
link, PermissionDenied for an escape or a hard link; an ContainError::Io keeps its own error.