pub enum ErrorKind {
Show 75 variants
InvalidCharacter(char),
MissingDigitsAfterDecimalPoint,
MissingExponent,
UnderscoresWithoutDigits,
MissingClosingQuote,
InvalidEscape(char),
LineBreakInStringIsNotAllowed,
UEscapeLeftBraceExpected,
UEscapeMissingRightBrace,
UEscapeEmpty,
UEscapeOutOfRange,
InvalidBackslashLiteral(char),
RawStringMissingOpeningQuote,
IntLiteralOutOfRange,
IntRadixOutOfRange,
ColonExpectedAfterRadix,
CharacterMissingOpeningApostrophe,
CharacterMissingClosingApostrophe,
InvalidPrefixToken,
InvalidInfixToken,
MissingDo,
MissingRightParen,
MissingEnd,
InvalidIfBranchToken,
BranchAfterElse,
IdentifierExpected,
LeftParenExpected,
UnexpectedEof,
CommaExpected,
ColonExpectedAfterDictKey,
RightBracketExpectedToCloseEmptyDict,
InExpectedAfterForBinding,
VariableDoesNotExist(Rc<str>),
InvalidAssignment,
TooManyLocals,
TooManyGlobals,
TooManyCaptures,
IfBranchTooLarge,
IfExpressionTooLarge,
OperatorRhsTooLarge,
LoopTooLarge,
BreakOutsideOfLoop,
TooManyFunctions,
TooManyArguments,
TooManyParameters,
TooManyMethods,
InvalidMethodName,
FunctionKindOutsideImpl,
MissingFunctionBody,
InvalidImplItem,
MissingMethodName,
TooManyImpls,
MethodAlreadyImplemented(RenderedSignature),
TooManyFields,
FieldDoesNotExist(Rc<str>),
FieldOutsideOfImpl,
MissingFields(Vec<Rc<str>>),
ListIsTooLong,
DictIsTooLarge,
TooManyTraits,
InvalidTraitItem,
TraitMethodCannotHaveBody,
TraitAlreadyHasMethod(RenderedSignature),
AsOutsideOfImpl,
TooManyTraitsInImpl,
AsCannotNest,
FunctionKindInTrait,
InvalidPattern,
TypeError {
expected: Cow<'static, str>,
got: Cow<'static, str>,
},
MethodDoesNotExist {
type_name: Rc<str>,
signature: RenderedSignature,
},
StructAlreadyImplemented,
UserDataAlreadyBorrowed,
DoubleMethodImplementation {
type_name: Rc<str>,
signature: RenderedSignature,
},
MethodsUnimplemented {
type_name: Rc<str>,
methods: Vec<RenderedSignature>,
},
User(Box<dyn Error>),
}Expand description
The kind of an error.
Check the source code of the Display implementation to see which error kind corresponds
to which error message.
Variants§
InvalidCharacter(char)
MissingDigitsAfterDecimalPoint
MissingExponent
UnderscoresWithoutDigits
MissingClosingQuote
InvalidEscape(char)
LineBreakInStringIsNotAllowed
UEscapeLeftBraceExpected
UEscapeMissingRightBrace
UEscapeEmpty
UEscapeOutOfRange
InvalidBackslashLiteral(char)
RawStringMissingOpeningQuote
IntLiteralOutOfRange
IntRadixOutOfRange
ColonExpectedAfterRadix
CharacterMissingOpeningApostrophe
CharacterMissingClosingApostrophe
InvalidPrefixToken
InvalidInfixToken
MissingDo
MissingRightParen
MissingEnd
InvalidIfBranchToken
BranchAfterElse
IdentifierExpected
LeftParenExpected
UnexpectedEof
CommaExpected
ColonExpectedAfterDictKey
RightBracketExpectedToCloseEmptyDict
InExpectedAfterForBinding
VariableDoesNotExist(Rc<str>)
InvalidAssignment
TooManyLocals
TooManyGlobals
TooManyCaptures
IfBranchTooLarge
IfExpressionTooLarge
OperatorRhsTooLarge
LoopTooLarge
BreakOutsideOfLoop
TooManyFunctions
TooManyArguments
TooManyParameters
TooManyMethods
InvalidMethodName
FunctionKindOutsideImpl
MissingFunctionBody
InvalidImplItem
MissingMethodName
TooManyImpls
MethodAlreadyImplemented(RenderedSignature)
TooManyFields
FieldDoesNotExist(Rc<str>)
FieldOutsideOfImpl
MissingFields(Vec<Rc<str>>)
ListIsTooLong
DictIsTooLarge
TooManyTraits
InvalidTraitItem
TraitMethodCannotHaveBody
TraitAlreadyHasMethod(RenderedSignature)
AsOutsideOfImpl
TooManyTraitsInImpl
AsCannotNest
FunctionKindInTrait
InvalidPattern
TypeError
MethodDoesNotExist
StructAlreadyImplemented
UserDataAlreadyBorrowed
DoubleMethodImplementation
MethodsUnimplemented
User(Box<dyn Error>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorKind
impl !RefUnwindSafe for ErrorKind
impl !Send for ErrorKind
impl !Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
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