Enum sway_error::lex_error::LexErrorKind
source · [−]pub enum LexErrorKind {
Show 18 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,
},
}Variants
UnclosedMultilineComment
UnexpectedCloseDelimiter
MismatchedDelimiters
UnclosedDelimiter
UnclosedStringLiteral
Fields
position: usizeUnclosedCharLiteral
Fields
position: usizeExpectedCloseQuote
Fields
position: usizeIncompleteHexIntLiteral
Fields
position: usizeIncompleteBinaryIntLiteral
Fields
position: usizeIncompleteOctalIntLiteral
Fields
position: usizeInvalidIntSuffix
Fields
suffix: IdentInvalidCharacter
InvalidHexEscape
UnicodeEscapeMissingBrace
Fields
position: usizeInvalidUnicodeEscapeDigit
Fields
position: usizeUnicodeEscapeOutOfRange
Fields
position: usizeUnicodeEscapeInvalidCharValue
Fields
span: SpanInvalidEscapeCode
Fields
position: usizeTrait Implementations
sourceimpl Clone for LexErrorKind
impl Clone for LexErrorKind
sourcefn clone(&self) -> LexErrorKind
fn clone(&self) -> LexErrorKind
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for LexErrorKind
impl Debug for LexErrorKind
sourceimpl Display for LexErrorKind
impl Display for LexErrorKind
sourceimpl Error for LexErrorKind
impl Error for LexErrorKind
1.30.0 · sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl Hash for LexErrorKind
impl Hash for LexErrorKind
sourceimpl PartialEq<LexErrorKind> for LexErrorKind
impl PartialEq<LexErrorKind> for LexErrorKind
sourcefn eq(&self, other: &LexErrorKind) -> bool
fn eq(&self, other: &LexErrorKind) -> bool
sourceimpl PartialOrd<LexErrorKind> for LexErrorKind
impl PartialOrd<LexErrorKind> for LexErrorKind
sourcefn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
fn partial_cmp(&self, other: &LexErrorKind) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more