pub struct ExitCode(/* private fields */);
Expand description
A Windows-specific exit code.
Implementations§
Source§impl ExitCode
impl ExitCode
Sourcepub const SUCCESS: Self
pub const SUCCESS: Self
The program terminated successfully.
Corresponds to exit code 0
.
This is the universal success code.
Sourcepub const GENERAL_ERROR: Self
pub const GENERAL_ERROR: Self
The program terminated with a general, unspecified error.
Corresponds to exit code 1
.
This is a common “catch-all” for general failures.
Sourcepub const FILE_NOT_FOUND: Self
pub const FILE_NOT_FOUND: Self
The system cannot find the file specified.
Corresponds to exit code 2
(ERROR_FILE_NOT_FOUND
).
Sourcepub const PATH_NOT_FOUND: Self
pub const PATH_NOT_FOUND: Self
The system cannot find the path specified.
Corresponds to exit code 3
(ERROR_PATH_NOT_FOUND
).
Sourcepub const ACCESS_DENIED: Self
pub const ACCESS_DENIED: Self
Access is denied.
Corresponds to exit code 5
(ERROR_ACCESS_DENIED
).
Sourcepub const NOT_ENOUGH_MEMORY: Self
pub const NOT_ENOUGH_MEMORY: Self
Not enough storage is available to process this command.
Corresponds to exit code 8
(ERROR_NOT_ENOUGH_MEMORY
).
Sourcepub const INVALID_PARAMETER: Self
pub const INVALID_PARAMETER: Self
The parameter is incorrect.
Corresponds to exit code 87
(ERROR_INVALID_PARAMETER
).
Sourcepub const BROKEN_PIPE: Self
pub const BROKEN_PIPE: Self
The pipe has been ended.
Corresponds to exit code 109
(ERROR_BROKEN_PIPE
).
Sourcepub const COMMAND_NOT_RECOGNIZED: Self
pub const COMMAND_NOT_RECOGNIZED: Self
The program is not recognized as a command, operable program, or batch file.
Corresponds to exit code 9009
.
This is a common code returned by cmd.exe
when a command cannot be found or executed.
Sourcepub const TERMINATED_BY_CTRL_C: Self
pub const TERMINATED_BY_CTRL_C: Self
The program terminated as a result of a CTRL+C or Ctrl+Break signal.
Cooresponds to exit code 0xC000_013A
.
Sourcepub const ACCESS_VIOLATION: Self
pub const ACCESS_VIOLATION: Self
The program was terminate due to an access violation.
Corresponds to exit code 0xC000_0005
.
Sourcepub const STACK_OVERFLOW: Self
pub const STACK_OVERFLOW: Self
The program terminated due to a stack oveflow.
Corresponds to exit code 0xC000_00FD
.
Trait Implementations§
Source§impl RawExitCode for ExitCode
impl RawExitCode for ExitCode
Source§fn from_raw(code: Self::Code) -> Self
fn from_raw(code: Self::Code) -> Self
RawExitCode
from the underlying code.