pub enum LanguageErrorKind {
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

Fields

expected: Cow<'static, str>
got: Cow<'static, str>

MethodDoesNotExist

Fields

type_name: Rc<str>
signature: RenderedSignature

StructAlreadyImplemented

UserDataAlreadyBorrowed

DoubleMethodImplementation

Fields

type_name: Rc<str>
signature: RenderedSignature

MethodsUnimplemented

Fields

type_name: Rc<str>

User(Box<dyn Error>)

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.