pub enum FStringErrorType {
UnclosedLbrace,
UnopenedRbrace,
ExpectedRbrace,
InvalidExpression(Box<ParseErrorType>),
InvalidConversionFlag,
EmptyExpression,
MismatchedDelimiter(char, char),
ExpressionNestedTooDeeply,
ExpressionCannotInclude(char),
SingleRbrace,
Unmatched(char),
UnterminatedString,
}
Expand description
Represents the different types of errors that can occur during parsing of an f-string.
Variants§
UnclosedLbrace
Expected a right brace after an opened left brace.
UnopenedRbrace
Expected a left brace after an ending right brace.
ExpectedRbrace
Expected a right brace after a conversion flag.
InvalidExpression(Box<ParseErrorType>)
An error occurred while parsing an f-string expression.
InvalidConversionFlag
An invalid conversion flag was encountered.
EmptyExpression
An empty expression was encountered.
MismatchedDelimiter(char, char)
An opening delimiter was not closed properly.
ExpressionNestedTooDeeply
Too many nested expressions in an f-string.
ExpressionCannotInclude(char)
The f-string expression cannot include the given character.
SingleRbrace
A single right brace was encountered.
Unmatched(char)
A closing delimiter was not opened properly.
UnterminatedString
Unterminated string.
Trait Implementations§
source§impl Debug for FStringErrorType
impl Debug for FStringErrorType
source§impl Display for FStringErrorType
impl Display for FStringErrorType
source§impl PartialEq for FStringErrorType
impl PartialEq for FStringErrorType
source§fn eq(&self, other: &FStringErrorType) -> bool
fn eq(&self, other: &FStringErrorType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FStringErrorType
Auto Trait Implementations§
impl Freeze for FStringErrorType
impl RefUnwindSafe for FStringErrorType
impl Send for FStringErrorType
impl Sync for FStringErrorType
impl Unpin for FStringErrorType
impl UnwindSafe for FStringErrorType
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