pub enum TokenizerError {
Show 13 variants
UnterminatedEscapeSequence,
UnterminatedSingleQuote(SourcePosition),
UnterminatedAnsiCQuote(SourcePosition),
UnterminatedDoubleQuote(SourcePosition),
UnterminatedBackquote(SourcePosition),
UnterminatedExtendedGlob(SourcePosition),
UnterminatedVariable,
UnterminatedCommandSubstitution,
FailedDecoding,
MissingHereTagForDocumentBody,
MissingHereTag(String),
UnterminatedHereDocuments(String, String),
ReadError(Error),
}Expand description
Represents an error that occurred during tokenization.
Variants§
UnterminatedEscapeSequence
An unterminated escape sequence was encountered at the end of the input stream.
UnterminatedSingleQuote(SourcePosition)
An unterminated single-quoted substring was encountered at the end of the input stream.
UnterminatedAnsiCQuote(SourcePosition)
An unterminated ANSI C-quoted substring was encountered at the end of the input stream.
UnterminatedDoubleQuote(SourcePosition)
An unterminated double-quoted substring was encountered at the end of the input stream.
UnterminatedBackquote(SourcePosition)
An unterminated back-quoted substring was encountered at the end of the input stream.
UnterminatedExtendedGlob(SourcePosition)
An unterminated extended glob (extglob) pattern was encountered at the end of the input stream.
UnterminatedVariable
An unterminated variable expression was encountered at the end of the input stream.
UnterminatedCommandSubstitution
An unterminated command substitiion was encountered at the end of the input stream.
FailedDecoding
An error occurred decoding UTF-8 characters in the input stream.
MissingHereTagForDocumentBody
An I/O here tag was missing.
MissingHereTag(String)
The indicated I/O here tag was missing.
UnterminatedHereDocuments(String, String)
An unterminated here document sequence was encountered at the end of the input stream.
ReadError(Error)
An I/O error occurred while reading from the input stream.
Implementations§
Source§impl TokenizerError
impl TokenizerError
Sourcepub const fn is_incomplete(&self) -> bool
pub const fn is_incomplete(&self) -> bool
Returns true if the error represents an error that could possibly be due to an incomplete input stream.
Trait Implementations§
Source§impl Debug for TokenizerError
impl Debug for TokenizerError
Source§impl Display for TokenizerError
impl Display for TokenizerError
Source§impl Error for TokenizerError
impl Error for TokenizerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for TokenizerError
impl !RefUnwindSafe for TokenizerError
impl Send for TokenizerError
impl Sync for TokenizerError
impl Unpin for TokenizerError
impl !UnwindSafe for TokenizerError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more