pub enum ExitCode {
Success,
InvalidUsage,
Unimplemented,
Custom(u8),
ExitShell(u8),
ReturnFromFunctionOrScript(u8),
ContinueLoop(u8),
BreakLoop(u8),
}
Expand description
Exit codes for built-in commands.
Variants§
Success
The command was successful.
InvalidUsage
The inputs to the command were invalid.
Unimplemented
The command is not implemented.
Custom(u8)
The command returned a specific custom numerical exit code.
ExitShell(u8)
The command is requesting to exit the shell, yielding the given exit code.
ReturnFromFunctionOrScript(u8)
The command is requesting to return from a function or script, yielding the given exit code.
ContinueLoop(u8)
The command is requesting to continue a loop, identified by the given nesting count.
BreakLoop(u8)
The command is requesting to break a loop, identified by the given nesting count.
Trait Implementations§
Source§impl From<ExecutionResult> for ExitCode
impl From<ExecutionResult> for ExitCode
Source§fn from(result: ExecutionResult) -> Self
fn from(result: ExecutionResult) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExitCode
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnwindSafe for ExitCode
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more