Enum fuel_etk_asm::ParseError
source · #[non_exhaustive]
pub enum ParseError {
ImmediateTooLarge {
backtrace: Backtrace,
},
Lexer {
source: Box<dyn Error>,
backtrace: Backtrace,
},
MissingArgument {
expected: usize,
got: usize,
backtrace: Backtrace,
},
ExtraArgument {
expected: usize,
backtrace: Backtrace,
},
ArgumentType {
backtrace: Backtrace,
},
}
Expand description
Type for errors that may arise while parsing assembly source code.
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.
ImmediateTooLarge
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.
An immediate value was too large for the given opcode.
Lexer
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.
The source code did not lex correctly.
MissingArgument
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.
A required argument for a macro was missing.
ExtraArgument
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.
Too many arguments were provided to a macro.
ArgumentType
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.
An argument provided to a macro was of the wrong type.
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseErrorwhere
Self: Debug + Display,
impl Error for ParseErrorwhere
Self: Debug + Display,
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 ParseError
impl ErrorCompat for ParseError
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<Rule>> for ParseError
impl From<Error<Rule>> for ParseError
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.
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 !RefUnwindSafe for ParseError
impl !Send for ParseError
impl !Sync for ParseError
impl Unpin for ParseError
impl !UnwindSafe for ParseError
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.