Enum sway_error::lex_error::LexErrorKind
source · pub enum LexErrorKind {
Show 19 variants
UnclosedMultilineComment {
unclosed_indices: Vec<usize>,
},
UnexpectedCloseDelimiter {
position: usize,
close_delimiter: Delimiter,
},
MismatchedDelimiters {
open_position: usize,
close_position: usize,
open_delimiter: Delimiter,
close_delimiter: Delimiter,
},
UnclosedDelimiter {
open_position: usize,
open_delimiter: Delimiter,
},
UnclosedStringLiteral {
position: usize,
},
UnclosedCharLiteral {
position: usize,
},
ExpectedCloseQuote {
position: usize,
},
IncompleteHexIntLiteral {
position: usize,
},
IncompleteBinaryIntLiteral {
position: usize,
},
IncompleteOctalIntLiteral {
position: usize,
},
InvalidIntSuffix {
suffix: Ident,
},
InvalidCharacter {
position: usize,
character: char,
},
InvalidHexEscape,
UnicodeEscapeMissingBrace {
position: usize,
},
InvalidUnicodeEscapeDigit {
position: usize,
},
UnicodeEscapeOutOfRange {
position: usize,
},
UnicodeEscapeInvalidCharValue {
span: Span,
},
InvalidEscapeCode {
position: usize,
},
U256NotInHex,
}
Variants§
UnclosedMultilineComment
UnexpectedCloseDelimiter
MismatchedDelimiters
Fields
UnclosedDelimiter
UnclosedStringLiteral
UnclosedCharLiteral
ExpectedCloseQuote
IncompleteHexIntLiteral
IncompleteBinaryIntLiteral
IncompleteOctalIntLiteral
InvalidIntSuffix
InvalidCharacter
InvalidHexEscape
UnicodeEscapeMissingBrace
InvalidUnicodeEscapeDigit
UnicodeEscapeOutOfRange
UnicodeEscapeInvalidCharValue
InvalidEscapeCode
U256NotInHex
Trait Implementations§
source§impl Clone for LexErrorKind
impl Clone for LexErrorKind
source§fn clone(&self) -> LexErrorKind
fn clone(&self) -> LexErrorKind
Returns a copy 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 LexErrorKind
impl Debug for LexErrorKind
source§impl Display for LexErrorKind
impl Display for LexErrorKind
source§impl Error for LexErrorKind
impl Error for LexErrorKind
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Hash for LexErrorKind
impl Hash for LexErrorKind
source§impl PartialEq<LexErrorKind> for LexErrorKind
impl PartialEq<LexErrorKind> for LexErrorKind
source§fn eq(&self, other: &LexErrorKind) -> bool
fn eq(&self, other: &LexErrorKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LexErrorKind> for LexErrorKind
impl PartialOrd<LexErrorKind> for LexErrorKind
source§fn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
fn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for LexErrorKind
impl StructuralEq for LexErrorKind
impl StructuralPartialEq for LexErrorKind
Auto Trait Implementations§
impl RefUnwindSafe for LexErrorKind
impl Send for LexErrorKind
impl Sync for LexErrorKind
impl Unpin for LexErrorKind
impl UnwindSafe for LexErrorKind
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more