pub enum ErrorCause {
CommandSubstError(Errno),
ArithError(ArithError),
AssignReadOnly(AssignReadOnlyError),
UnsetParameter {
param: Param,
},
VacantExpansion(VacantError),
NonassignableParameter(NonassignableError),
}Expand description
Types of errors that may occur in the word expansion.
Variants§
CommandSubstError(Errno)
System error while performing a command substitution.
ArithError(ArithError)
Error while evaluating an arithmetic expansion.
AssignReadOnly(AssignReadOnlyError)
Assignment to a read-only variable.
UnsetParameter
Expansion of an unset parameter with the nounset option
VacantExpansion(VacantError)
Expansion of an empty value with an error switch
NonassignableParameter(NonassignableError)
Assignment to a nonassignable parameter
Implementations§
Source§impl ErrorCause
impl ErrorCause
Returns a location related with the error cause and a message describing the location.
Returns a footer message for the error.
Trait Implementations§
Source§impl Clone for ErrorCause
impl Clone for ErrorCause
Source§fn clone(&self) -> ErrorCause
fn clone(&self) -> ErrorCause
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorCause
impl Debug for ErrorCause
Source§impl Display for ErrorCause
impl Display for ErrorCause
Source§impl Error for ErrorCause
impl Error for ErrorCause
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()
Source§impl From<ArithError> for ErrorCause
impl From<ArithError> for ErrorCause
Source§fn from(source: ArithError) -> Self
fn from(source: ArithError) -> Self
Converts to this type from the input type.
Source§impl From<AssignReadOnlyError> for ErrorCause
impl From<AssignReadOnlyError> for ErrorCause
Source§fn from(source: AssignReadOnlyError) -> Self
fn from(source: AssignReadOnlyError) -> Self
Converts to this type from the input type.
Source§impl From<ErrorCause> for ErrorCause
impl From<ErrorCause> for ErrorCause
Source§fn from(source: ErrorCause) -> Self
fn from(source: ErrorCause) -> Self
Converts to this type from the input type.
Source§impl From<NonassignableError> for ErrorCause
impl From<NonassignableError> for ErrorCause
Source§fn from(source: NonassignableError) -> Self
fn from(source: NonassignableError) -> Self
Converts to this type from the input type.
Source§impl From<VacantError> for ErrorCause
impl From<VacantError> for ErrorCause
Source§fn from(source: VacantError) -> Self
fn from(source: VacantError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ErrorCause
impl PartialEq for ErrorCause
impl Eq for ErrorCause
impl StructuralPartialEq for ErrorCause
Auto Trait Implementations§
impl Freeze for ErrorCause
impl !RefUnwindSafe for ErrorCause
impl !Send for ErrorCause
impl !Sync for ErrorCause
impl Unpin for ErrorCause
impl !UnwindSafe for ErrorCause
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> 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>
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