pub enum Error {
CargoLlvmCovTargetDirNotSet,
CommandAttachToStdin {
command: String,
},
CommandBackground {
command: String,
source: Error,
},
CommandExec {
command: String,
source: Error,
},
CommandNonZero {
command: String,
exit_status: ExitStatus,
stderr: String,
},
CommandWriteToStdin {
command: String,
source: Error,
},
ExecutableNotFound {
command: String,
source: Error,
},
Io {
context: String,
source: Error,
},
IoPath {
path: PathBuf,
context: String,
source: Error,
},
PasswordHash {
context: String,
source: Error,
},
Utf8String {
context: String,
source: Utf8Error,
},
}Expand description
An error that may occur when creating users or running a command as different user.
Variants§
CargoLlvmCovTargetDirNotSet
The environment variable CARGO_LLVM_COV_TARGET_DIR is not set.
CommandAttachToStdin
Unable to attach to stdin of a command.
CommandBackground
A command exited unsuccessfully.
Fields
CommandExec
A command could not be executed.
CommandNonZero
A command exited unsuccessfully.
Fields
§
exit_status: ExitStatusThe exit status of command.
CommandWriteToStdin
Unable to write to stdin of a command.
Fields
ExecutableNotFound
An executable that is supposed to be called, is not found.
Io
An I/O error.
IoPath
An I/O error with a specific path.
Fields
PasswordHash
A password hash error occurred.
Fields
Utf8String
A UTF-8 error occurred when trying to convert a byte vector to a string.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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