#[non_exhaustive]pub enum Error {
#[non_exhaustive] DuplicateLabel {
label: String,
backtrace: Backtrace,
},
#[non_exhaustive] DuplicateMacro {
name: String,
backtrace: Backtrace,
},
#[non_exhaustive] ExpressionTooLarge {
expr: Expression,
value: BigInt,
spec: Op<()>,
backtrace: Backtrace,
},
ExpressionNegative {
expr: Expression,
value: BigInt,
backtrace: Backtrace,
},
#[non_exhaustive] UnsizedPushTooLarge {
backtrace: Backtrace,
},
#[non_exhaustive] UndeclaredLabels {
labels: Vec<String>,
backtrace: Backtrace,
},
#[non_exhaustive] UndeclaredInstructionMacro {
name: String,
backtrace: Backtrace,
},
#[non_exhaustive] UndeclaredExpressionMacro {
name: String,
backtrace: Backtrace,
},
#[non_exhaustive] ParseInclude {
source: ParseError,
},
}Expand description
Errors that can occur while assembling instructions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]DuplicateLabel
A label was declared multiple times.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]DuplicateMacro
A macro was declared multiple times.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]ExpressionTooLarge
A push instruction was too small for the result of the expression.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
expr: ExpressionThe oversized expression.
ExpressionNegative
An expression evaluated to a negative number.
Fields
§
expr: ExpressionThe oversized expression.
#[non_exhaustive]UnsizedPushTooLarge
The value provided to an unsized push (%push) was too large.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]UndeclaredLabels
A label was used without being defined.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]UndeclaredInstructionMacro
An instruction macro was used without being defined.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]UndeclaredExpressionMacro
An expression macro was used without being defined.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]ParseInclude
An import or include failed to parse.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
source: ParseErrorThe next source of this error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(error: AssembleError) -> Self
fn from(error: AssembleError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(error: ParseError) -> Self
fn from(error: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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