pub enum Error {
Show 24 variants
CurrentDir {
source: Error,
},
NormalizePath {
path: PathBuf,
source: Error,
},
NotGitWorktree,
GitIo {
command: String,
source: Error,
},
GitFailed {
command: String,
stderr: String,
},
RootPathNotFound,
ConfigNotFound(PathBuf),
ConfigIo {
path: PathBuf,
source: Error,
},
ConfigParse {
path: PathBuf,
message: String,
},
ConfigInvalid {
path: PathBuf,
message: String,
},
InvalidBooleanEnv {
name: &'static str,
value: String,
},
NoConfigDetectedStrict,
RootWorktreeStrict,
CommandIo {
label: String,
source: Error,
},
CommandFailed {
label: String,
status: ExitStatus,
},
FileOperationConflict {
operation: &'static str,
path: PathBuf,
message: String,
},
FileOperationInvalid {
operation: &'static str,
message: String,
},
FileOperationIo {
operation: &'static str,
path: PathBuf,
source: Error,
},
ScriptIo {
path: PathBuf,
source: Error,
},
ScriptFailed {
path: PathBuf,
status: ExitStatus,
},
Output {
source: Error,
},
DoctorFailed,
InitTargetExists(PathBuf),
InitIo {
path: PathBuf,
source: Error,
},
}Expand description
Error type for treeboot-core operations.
Variants§
CurrentDir
The current working directory could not be read.
NormalizePath
A filesystem path could not be normalized.
NotGitWorktree
The command was not run from a Git worktree.
GitIo
A Git command could not be spawned.
GitFailed
A Git command exited unsuccessfully.
RootPathNotFound
No root checkout path could be determined.
ConfigNotFound(PathBuf)
A specifically requested config file does not exist.
ConfigIo
A config file could not be read.
ConfigParse
A config file contains invalid TOML.
ConfigInvalid
A config file contains unsupported or invalid declarations.
InvalidBooleanEnv
A treeboot boolean environment variable has an unsupported value.
NoConfigDetectedStrict
No config was found while strict mode was enabled.
RootWorktreeStrict
The command was run from the root checkout while strict mode was enabled.
CommandIo
A configured command could not be spawned.
CommandFailed
A configured command exited unsuccessfully.
FileOperationConflict
A file operation encountered an unsupported conflict.
Fields
FileOperationInvalid
A manual file operation request is invalid.
Fields
FileOperationIo
A file operation failed while accessing the filesystem.
Fields
ScriptIo
An init script could not be spawned.
ScriptFailed
An init script exited unsuccessfully.
Output
Writing output failed.
DoctorFailed
Doctor diagnostics found fatal issues.
InitTargetExists(PathBuf)
treeboot init refused to replace an existing target.
InitIo
An init file could not be written.
Implementations§
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()