#[non_exhaustive]pub enum Unusable {
NotInPath,
NotPortable,
}Expand description
Reason why a built-in found in the command search cannot be executed
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotInPath
The built-in is substitutive, but no corresponding
external utility was found in $PATH.
NotPortable
The built-in, or the name under which it was found, is not defined in
POSIX, and the Portable option rejects it.
Implementations§
Source§impl Unusable
impl Unusable
Sourcepub const fn exit_status(self) -> ExitStatus
pub const fn exit_status(self) -> ExitStatus
Returns the exit status the shell should produce for this reason.
This is 126 if the built-in was rejected, and 127 if it effectively does not exist as a runnable command.
Trait Implementations§
impl Copy for Unusable
Source§impl Display for Unusable
Describes the reason without naming the built-in.
impl Display for Unusable
Describes the reason without naming the built-in.
The result is a sentence fragment meant to be embedded in an error message that identifies the built-in, so it does not mention the name itself. It states what the built-in is and why that makes it unusable, so the message stands on its own without a title telling the two reasons apart.
impl Eq for Unusable
impl StructuralPartialEq for Unusable
Auto Trait Implementations§
impl Freeze for Unusable
impl RefUnwindSafe for Unusable
impl Send for Unusable
impl Sync for Unusable
impl Unpin for Unusable
impl UnsafeUnpin for Unusable
impl UnwindSafe for Unusable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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