pub enum ExpansionError {
DivideByZero,
NegativeExponent,
BadAssig(String),
EmptyParameter(String, String),
}Expand description
An error which may arise during parameter expansion.
Variants§
DivideByZero
Attempted to divide by zero in an arithmetic subsitution.
NegativeExponent
Attempted to raise to a negative power in an arithmetic subsitution.
BadAssig(String)
Attempted to assign a special parameter, e.g. ${!:=value}.
EmptyParameter(String, String)
Attempted to evaluate a null or unset parameter, i.e. ${var:?msg}.
Trait Implementations§
Source§impl Clone for ExpansionError
impl Clone for ExpansionError
Source§fn clone(&self) -> ExpansionError
fn clone(&self) -> ExpansionError
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 ExpansionError
impl Debug for ExpansionError
Source§impl Display for ExpansionError
impl Display for ExpansionError
Source§impl Error for ExpansionError
impl Error for ExpansionError
1.30.0 · 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<ExpansionError> for RuntimeError
impl From<ExpansionError> for RuntimeError
Source§fn from(source: ExpansionError) -> Self
fn from(source: ExpansionError) -> Self
Converts to this type from the input type.
Source§impl IsFatalError for ExpansionError
impl IsFatalError for ExpansionError
Source§impl PartialEq for ExpansionError
impl PartialEq for ExpansionError
impl Eq for ExpansionError
impl StructuralPartialEq for ExpansionError
Auto Trait Implementations§
impl Freeze for ExpansionError
impl RefUnwindSafe for ExpansionError
impl Send for ExpansionError
impl Sync for ExpansionError
impl Unpin for ExpansionError
impl UnwindSafe for ExpansionError
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