Enum lib_ruby_parser::DiagnosticMessage[][src]

pub enum DiagnosticMessage {
Show 86 variants FractionAfterNumeric(FractionAfterNumeric), NoDigitsAfterDot(NoDigitsAfterDot), UnknownTypeOfPercentString(UnknownTypeOfPercentString), NumericLiteralWithoutDigits(NumericLiteralWithoutDigits), UnterminatedList(UnterminatedList), UnterminatedRegexp(UnterminatedRegexp), UnterminatedString(UnterminatedString), UnterminatedQuotedString(UnterminatedQuotedString), InvalidUnicodeEscape(InvalidUnicodeEscape), TooLargeUnicodeCodepoint(TooLargeUnicodeCodepoint), InvalidUnicodeCodepoint(InvalidUnicodeCodepoint), MultipleCodepointAtSingleChar(MultipleCodepointAtSingleChar), InvalidEscapeCharacter(InvalidEscapeCharacter), InvalidHexEscape(InvalidHexEscape), UnterminatedHeredoc(UnterminatedHeredoc), UnterminatedHeredocId(UnterminatedHeredocId), SlashRAtMiddleOfLine(SlashRAtMiddleOfLine), DStarInterpretedAsArgPrefix(DStarInterpretedAsArgPrefix), StarInterpretedAsArgPrefix(StarInterpretedAsArgPrefix), AmpersandInterpretedAsArgPrefix(AmpersandInterpretedAsArgPrefix), TripleDotAtEol(TripleDotAtEol), ParenthesesIterpretedAsArglist(ParenthesesIterpretedAsArglist), AmbiguousFirstArgument(AmbiguousFirstArgument), AmbiguousOperator(AmbiguousOperator), InvalidCharacterSyntax(InvalidCharacterSyntax), InvalidOctalDigit(InvalidOctalDigit), TrailingCharInNumber(TrailingCharInNumber), EmbeddedDocumentMeetsEof(EmbeddedDocumentMeetsEof), InvalidChar(InvalidChar), IncompleteCharacterSyntax(IncompleteCharacterSyntax), GvarWithoutId(GvarWithoutId), InvalidGvarName(InvalidGvarName), IvarWithoutId(IvarWithoutId), InvalidIvarName(InvalidIvarName), CvarWithoutId(CvarWithoutId), InvalidCvarName(InvalidCvarName), UnknownRegexOptions(UnknownRegexOptions), UnterminatedUnicodeEscape(UnterminatedUnicodeEscape), EncodingError(EncodingError), InvalidMultibyteChar(InvalidMultibyteChar), AmbiguousTernaryOperator(AmbiguousTernaryOperator), AmbiguousRegexp(AmbiguousRegexp), ElseWithoutRescue(ElseWithoutRescue), BeginNotAtTopLevel(BeginNotAtTopLevel), AliasNthRef(AliasNthRef), CsendInsideMasgn(CsendInsideMasgn), ClassOrModuleNameMustBeConstant(ClassOrModuleNameMustBeConstant), EndlessSetterDefinition(EndlessSetterDefinition), UnexpectedToken(UnexpectedToken), ClassDefinitionInMethodBody(ClassDefinitionInMethodBody), ModuleDefinitionInMethodBody(ModuleDefinitionInMethodBody), InvalidReturnInClassOrModuleBody(InvalidReturnInClassOrModuleBody), ConstArgument(ConstArgument), IvarArgument(IvarArgument), GvarArgument(GvarArgument), CvarArgument(CvarArgument), NoSuchLocalVariable(NoSuchLocalVariable), OrdinaryParamDefined(OrdinaryParamDefined), NumparamUsed(NumparamUsed), TokAtEolWithoutExpression(TokAtEolWithoutExpression), EndInMethod(EndInMethod), ComparisonAfterComparison(ComparisonAfterComparison), CircularArgumentReference(CircularArgumentReference), DynamicConstantAssignment(DynamicConstantAssignment), CantAssignToSelf(CantAssignToSelf), CantAssignToNil(CantAssignToNil), CantAssignToTrue(CantAssignToTrue), CantAssignToFalse(CantAssignToFalse), CantAssignToFile(CantAssignToFile), CantAssignToLine(CantAssignToLine), CantAssignToEncoding(CantAssignToEncoding), CantAssignToNumparam(CantAssignToNumparam), CantSetVariable(CantSetVariable), BlockGivenToYield(BlockGivenToYield), BlockAndBlockArgGiven(BlockAndBlockArgGiven), SymbolLiteralWithInterpolation(SymbolLiteralWithInterpolation), ReservedForNumparam(ReservedForNumparam), KeyMustBeValidAsLocalVariable(KeyMustBeValidAsLocalVariable), DuplicateVariableName(DuplicateVariableName), DuplicateKeyName(DuplicateKeyName), SingletonLiteral(SingletonLiteral), NthRefIsTooBig(NthRefIsTooBig), DuplicatedArgumentName(DuplicatedArgumentName), RegexError(RegexError), InvalidSymbol(InvalidSymbol), VoidValueExpression(VoidValueExpression),
}
Expand description

Enum of all possible diagnostic message (both warnings and errors)

Variants

FractionAfterNumeric(FractionAfterNumeric)

Tuple Fields of FractionAfterNumeric

0: FractionAfterNumeric
NoDigitsAfterDot(NoDigitsAfterDot)

Tuple Fields of NoDigitsAfterDot

0: NoDigitsAfterDot
UnknownTypeOfPercentString(UnknownTypeOfPercentString)

Tuple Fields of UnknownTypeOfPercentString

0: UnknownTypeOfPercentString
NumericLiteralWithoutDigits(NumericLiteralWithoutDigits)

Tuple Fields of NumericLiteralWithoutDigits

0: NumericLiteralWithoutDigits
UnterminatedList(UnterminatedList)

Tuple Fields of UnterminatedList

0: UnterminatedList
UnterminatedRegexp(UnterminatedRegexp)

Tuple Fields of UnterminatedRegexp

0: UnterminatedRegexp
UnterminatedString(UnterminatedString)

Tuple Fields of UnterminatedString

0: UnterminatedString
UnterminatedQuotedString(UnterminatedQuotedString)

Tuple Fields of UnterminatedQuotedString

0: UnterminatedQuotedString
InvalidUnicodeEscape(InvalidUnicodeEscape)

Tuple Fields of InvalidUnicodeEscape

0: InvalidUnicodeEscape
TooLargeUnicodeCodepoint(TooLargeUnicodeCodepoint)

Tuple Fields of TooLargeUnicodeCodepoint

0: TooLargeUnicodeCodepoint
InvalidUnicodeCodepoint(InvalidUnicodeCodepoint)

Tuple Fields of InvalidUnicodeCodepoint

0: InvalidUnicodeCodepoint
MultipleCodepointAtSingleChar(MultipleCodepointAtSingleChar)

Tuple Fields of MultipleCodepointAtSingleChar

0: MultipleCodepointAtSingleChar
InvalidEscapeCharacter(InvalidEscapeCharacter)

Tuple Fields of InvalidEscapeCharacter

0: InvalidEscapeCharacter
InvalidHexEscape(InvalidHexEscape)

Tuple Fields of InvalidHexEscape

0: InvalidHexEscape
UnterminatedHeredoc(UnterminatedHeredoc)

Tuple Fields of UnterminatedHeredoc

0: UnterminatedHeredoc
UnterminatedHeredocId(UnterminatedHeredocId)

Tuple Fields of UnterminatedHeredocId

0: UnterminatedHeredocId
SlashRAtMiddleOfLine(SlashRAtMiddleOfLine)

Tuple Fields of SlashRAtMiddleOfLine

0: SlashRAtMiddleOfLine
DStarInterpretedAsArgPrefix(DStarInterpretedAsArgPrefix)

Tuple Fields of DStarInterpretedAsArgPrefix

0: DStarInterpretedAsArgPrefix
StarInterpretedAsArgPrefix(StarInterpretedAsArgPrefix)

Tuple Fields of StarInterpretedAsArgPrefix

0: StarInterpretedAsArgPrefix
AmpersandInterpretedAsArgPrefix(AmpersandInterpretedAsArgPrefix)

Tuple Fields of AmpersandInterpretedAsArgPrefix

0: AmpersandInterpretedAsArgPrefix
TripleDotAtEol(TripleDotAtEol)

Tuple Fields of TripleDotAtEol

0: TripleDotAtEol
ParenthesesIterpretedAsArglist(ParenthesesIterpretedAsArglist)

Tuple Fields of ParenthesesIterpretedAsArglist

0: ParenthesesIterpretedAsArglist
AmbiguousFirstArgument(AmbiguousFirstArgument)

Tuple Fields of AmbiguousFirstArgument

0: AmbiguousFirstArgument
AmbiguousOperator(AmbiguousOperator)

Tuple Fields of AmbiguousOperator

0: AmbiguousOperator
InvalidCharacterSyntax(InvalidCharacterSyntax)

Tuple Fields of InvalidCharacterSyntax

0: InvalidCharacterSyntax
InvalidOctalDigit(InvalidOctalDigit)

Tuple Fields of InvalidOctalDigit

0: InvalidOctalDigit
TrailingCharInNumber(TrailingCharInNumber)

Tuple Fields of TrailingCharInNumber

0: TrailingCharInNumber
EmbeddedDocumentMeetsEof(EmbeddedDocumentMeetsEof)

Tuple Fields of EmbeddedDocumentMeetsEof

0: EmbeddedDocumentMeetsEof
InvalidChar(InvalidChar)

Tuple Fields of InvalidChar

0: InvalidChar
IncompleteCharacterSyntax(IncompleteCharacterSyntax)

Tuple Fields of IncompleteCharacterSyntax

0: IncompleteCharacterSyntax
GvarWithoutId(GvarWithoutId)

Tuple Fields of GvarWithoutId

0: GvarWithoutId
InvalidGvarName(InvalidGvarName)

Tuple Fields of InvalidGvarName

0: InvalidGvarName
IvarWithoutId(IvarWithoutId)

Tuple Fields of IvarWithoutId

0: IvarWithoutId
InvalidIvarName(InvalidIvarName)

Tuple Fields of InvalidIvarName

0: InvalidIvarName
CvarWithoutId(CvarWithoutId)

Tuple Fields of CvarWithoutId

0: CvarWithoutId
InvalidCvarName(InvalidCvarName)

Tuple Fields of InvalidCvarName

0: InvalidCvarName
UnknownRegexOptions(UnknownRegexOptions)

Tuple Fields of UnknownRegexOptions

0: UnknownRegexOptions
UnterminatedUnicodeEscape(UnterminatedUnicodeEscape)

Tuple Fields of UnterminatedUnicodeEscape

0: UnterminatedUnicodeEscape
EncodingError(EncodingError)

Tuple Fields of EncodingError

0: EncodingError
InvalidMultibyteChar(InvalidMultibyteChar)

Tuple Fields of InvalidMultibyteChar

0: InvalidMultibyteChar
AmbiguousTernaryOperator(AmbiguousTernaryOperator)

Tuple Fields of AmbiguousTernaryOperator

0: AmbiguousTernaryOperator
AmbiguousRegexp(AmbiguousRegexp)

Tuple Fields of AmbiguousRegexp

0: AmbiguousRegexp
ElseWithoutRescue(ElseWithoutRescue)

Tuple Fields of ElseWithoutRescue

0: ElseWithoutRescue
BeginNotAtTopLevel(BeginNotAtTopLevel)

Tuple Fields of BeginNotAtTopLevel

0: BeginNotAtTopLevel
AliasNthRef(AliasNthRef)

Tuple Fields of AliasNthRef

0: AliasNthRef
CsendInsideMasgn(CsendInsideMasgn)

Tuple Fields of CsendInsideMasgn

0: CsendInsideMasgn
ClassOrModuleNameMustBeConstant(ClassOrModuleNameMustBeConstant)

Tuple Fields of ClassOrModuleNameMustBeConstant

0: ClassOrModuleNameMustBeConstant
EndlessSetterDefinition(EndlessSetterDefinition)

Tuple Fields of EndlessSetterDefinition

0: EndlessSetterDefinition
UnexpectedToken(UnexpectedToken)

Tuple Fields of UnexpectedToken

0: UnexpectedToken
ClassDefinitionInMethodBody(ClassDefinitionInMethodBody)

Tuple Fields of ClassDefinitionInMethodBody

0: ClassDefinitionInMethodBody
ModuleDefinitionInMethodBody(ModuleDefinitionInMethodBody)

Tuple Fields of ModuleDefinitionInMethodBody

0: ModuleDefinitionInMethodBody
InvalidReturnInClassOrModuleBody(InvalidReturnInClassOrModuleBody)

Tuple Fields of InvalidReturnInClassOrModuleBody

0: InvalidReturnInClassOrModuleBody
ConstArgument(ConstArgument)

Tuple Fields of ConstArgument

0: ConstArgument
IvarArgument(IvarArgument)

Tuple Fields of IvarArgument

0: IvarArgument
GvarArgument(GvarArgument)

Tuple Fields of GvarArgument

0: GvarArgument
CvarArgument(CvarArgument)

Tuple Fields of CvarArgument

0: CvarArgument
NoSuchLocalVariable(NoSuchLocalVariable)

Tuple Fields of NoSuchLocalVariable

0: NoSuchLocalVariable
OrdinaryParamDefined(OrdinaryParamDefined)

Tuple Fields of OrdinaryParamDefined

0: OrdinaryParamDefined
NumparamUsed(NumparamUsed)

Tuple Fields of NumparamUsed

0: NumparamUsed
TokAtEolWithoutExpression(TokAtEolWithoutExpression)

Tuple Fields of TokAtEolWithoutExpression

0: TokAtEolWithoutExpression
EndInMethod(EndInMethod)

Tuple Fields of EndInMethod

0: EndInMethod
ComparisonAfterComparison(ComparisonAfterComparison)

Tuple Fields of ComparisonAfterComparison

0: ComparisonAfterComparison
CircularArgumentReference(CircularArgumentReference)

Tuple Fields of CircularArgumentReference

0: CircularArgumentReference
DynamicConstantAssignment(DynamicConstantAssignment)

Tuple Fields of DynamicConstantAssignment

0: DynamicConstantAssignment
CantAssignToSelf(CantAssignToSelf)

Tuple Fields of CantAssignToSelf

0: CantAssignToSelf
CantAssignToNil(CantAssignToNil)

Tuple Fields of CantAssignToNil

0: CantAssignToNil
CantAssignToTrue(CantAssignToTrue)

Tuple Fields of CantAssignToTrue

0: CantAssignToTrue
CantAssignToFalse(CantAssignToFalse)

Tuple Fields of CantAssignToFalse

0: CantAssignToFalse
CantAssignToFile(CantAssignToFile)

Tuple Fields of CantAssignToFile

0: CantAssignToFile
CantAssignToLine(CantAssignToLine)

Tuple Fields of CantAssignToLine

0: CantAssignToLine
CantAssignToEncoding(CantAssignToEncoding)

Tuple Fields of CantAssignToEncoding

0: CantAssignToEncoding
CantAssignToNumparam(CantAssignToNumparam)

Tuple Fields of CantAssignToNumparam

0: CantAssignToNumparam
CantSetVariable(CantSetVariable)

Tuple Fields of CantSetVariable

0: CantSetVariable
BlockGivenToYield(BlockGivenToYield)

Tuple Fields of BlockGivenToYield

0: BlockGivenToYield
BlockAndBlockArgGiven(BlockAndBlockArgGiven)

Tuple Fields of BlockAndBlockArgGiven

0: BlockAndBlockArgGiven
SymbolLiteralWithInterpolation(SymbolLiteralWithInterpolation)

Tuple Fields of SymbolLiteralWithInterpolation

0: SymbolLiteralWithInterpolation
ReservedForNumparam(ReservedForNumparam)

Tuple Fields of ReservedForNumparam

0: ReservedForNumparam
KeyMustBeValidAsLocalVariable(KeyMustBeValidAsLocalVariable)

Tuple Fields of KeyMustBeValidAsLocalVariable

0: KeyMustBeValidAsLocalVariable
DuplicateVariableName(DuplicateVariableName)

Tuple Fields of DuplicateVariableName

0: DuplicateVariableName
DuplicateKeyName(DuplicateKeyName)

Tuple Fields of DuplicateKeyName

0: DuplicateKeyName
SingletonLiteral(SingletonLiteral)

Tuple Fields of SingletonLiteral

0: SingletonLiteral
NthRefIsTooBig(NthRefIsTooBig)

Tuple Fields of NthRefIsTooBig

0: NthRefIsTooBig
DuplicatedArgumentName(DuplicatedArgumentName)

Tuple Fields of DuplicatedArgumentName

0: DuplicatedArgumentName
RegexError(RegexError)

Tuple Fields of RegexError

0: RegexError
InvalidSymbol(InvalidSymbol)

Tuple Fields of InvalidSymbol

0: InvalidSymbol
VoidValueExpression(VoidValueExpression)

Tuple Fields of VoidValueExpression

0: VoidValueExpression

Implementations

Constructs FractionAfterNumeric variant

Constructs NoDigitsAfterDot variant

Constructs UnknownTypeOfPercentString variant

Constructs NumericLiteralWithoutDigits variant

Constructs UnterminatedList variant

Constructs UnterminatedRegexp variant

Constructs UnterminatedString variant

Constructs UnterminatedQuotedString variant

Constructs InvalidUnicodeEscape variant

Constructs TooLargeUnicodeCodepoint variant

Constructs InvalidUnicodeCodepoint variant

Constructs MultipleCodepointAtSingleChar variant

Constructs InvalidEscapeCharacter variant

Constructs InvalidHexEscape variant

Constructs UnterminatedHeredoc variant

Constructs UnterminatedHeredocId variant

Constructs SlashRAtMiddleOfLine variant

Constructs DStarInterpretedAsArgPrefix variant

Constructs StarInterpretedAsArgPrefix variant

Constructs AmpersandInterpretedAsArgPrefix variant

Constructs TripleDotAtEol variant

Constructs ParenthesesIterpretedAsArglist variant

Constructs AmbiguousFirstArgument variant

Constructs AmbiguousOperator variant

Constructs InvalidCharacterSyntax variant

Constructs InvalidOctalDigit variant

Constructs TrailingCharInNumber variant

Constructs EmbeddedDocumentMeetsEof variant

Constructs InvalidChar variant

Constructs IncompleteCharacterSyntax variant

Constructs GvarWithoutId variant

Constructs InvalidGvarName variant

Constructs IvarWithoutId variant

Constructs InvalidIvarName variant

Constructs CvarWithoutId variant

Constructs InvalidCvarName variant

Constructs UnknownRegexOptions variant

Constructs UnterminatedUnicodeEscape variant

Constructs EncodingError variant

Constructs InvalidMultibyteChar variant

Constructs AmbiguousTernaryOperator variant

Constructs AmbiguousRegexp variant

Constructs ElseWithoutRescue variant

Constructs BeginNotAtTopLevel variant

Constructs AliasNthRef variant

Constructs CsendInsideMasgn variant

Constructs ClassOrModuleNameMustBeConstant variant

Constructs EndlessSetterDefinition variant

Constructs UnexpectedToken variant

Constructs ClassDefinitionInMethodBody variant

Constructs ModuleDefinitionInMethodBody variant

Constructs InvalidReturnInClassOrModuleBody variant

Constructs ConstArgument variant

Constructs IvarArgument variant

Constructs GvarArgument variant

Constructs CvarArgument variant

Constructs NoSuchLocalVariable variant

Constructs OrdinaryParamDefined variant

Constructs NumparamUsed variant

Constructs TokAtEolWithoutExpression variant

Constructs EndInMethod variant

Constructs ComparisonAfterComparison variant

Constructs CircularArgumentReference variant

Constructs DynamicConstantAssignment variant

Constructs CantAssignToSelf variant

Constructs CantAssignToNil variant

Constructs CantAssignToTrue variant

Constructs CantAssignToFalse variant

Constructs CantAssignToFile variant

Constructs CantAssignToLine variant

Constructs CantAssignToEncoding variant

Constructs CantAssignToNumparam variant

Constructs CantSetVariable variant

Constructs BlockGivenToYield variant

Constructs BlockAndBlockArgGiven variant

Constructs SymbolLiteralWithInterpolation variant

Constructs ReservedForNumparam variant

Constructs KeyMustBeValidAsLocalVariable variant

Constructs DuplicateVariableName variant

Constructs DuplicateKeyName variant

Constructs SingletonLiteral variant

Constructs NthRefIsTooBig variant

Constructs DuplicatedArgumentName variant

Constructs RegexError variant

Constructs InvalidSymbol variant

Constructs VoidValueExpression variant

Returns true if self is FractionAfterNumeric

Returns true if self is NoDigitsAfterDot

Returns true if self is UnknownTypeOfPercentString

Returns true if self is NumericLiteralWithoutDigits

Returns true if self is UnterminatedList

Returns true if self is UnterminatedRegexp

Returns true if self is UnterminatedString

Returns true if self is UnterminatedQuotedString

Returns true if self is InvalidUnicodeEscape

Returns true if self is TooLargeUnicodeCodepoint

Returns true if self is InvalidUnicodeCodepoint

Returns true if self is MultipleCodepointAtSingleChar

Returns true if self is InvalidEscapeCharacter

Returns true if self is InvalidHexEscape

Returns true if self is UnterminatedHeredoc

Returns true if self is UnterminatedHeredocId

Returns true if self is SlashRAtMiddleOfLine

Returns true if self is DStarInterpretedAsArgPrefix

Returns true if self is StarInterpretedAsArgPrefix

Returns true if self is AmpersandInterpretedAsArgPrefix

Returns true if self is TripleDotAtEol

Returns true if self is ParenthesesIterpretedAsArglist

Returns true if self is AmbiguousFirstArgument

Returns true if self is AmbiguousOperator

Returns true if self is InvalidCharacterSyntax

Returns true if self is InvalidOctalDigit

Returns true if self is TrailingCharInNumber

Returns true if self is EmbeddedDocumentMeetsEof

Returns true if self is InvalidChar

Returns true if self is IncompleteCharacterSyntax

Returns true if self is GvarWithoutId

Returns true if self is InvalidGvarName

Returns true if self is IvarWithoutId

Returns true if self is InvalidIvarName

Returns true if self is CvarWithoutId

Returns true if self is InvalidCvarName

Returns true if self is UnknownRegexOptions

Returns true if self is UnterminatedUnicodeEscape

Returns true if self is EncodingError

Returns true if self is InvalidMultibyteChar

Returns true if self is AmbiguousTernaryOperator

Returns true if self is AmbiguousRegexp

Returns true if self is ElseWithoutRescue

Returns true if self is BeginNotAtTopLevel

Returns true if self is AliasNthRef

Returns true if self is CsendInsideMasgn

Returns true if self is ClassOrModuleNameMustBeConstant

Returns true if self is EndlessSetterDefinition

Returns true if self is UnexpectedToken

Returns true if self is ClassDefinitionInMethodBody

Returns true if self is ModuleDefinitionInMethodBody

Returns true if self is InvalidReturnInClassOrModuleBody

Returns true if self is ConstArgument

Returns true if self is IvarArgument

Returns true if self is GvarArgument

Returns true if self is CvarArgument

Returns true if self is NoSuchLocalVariable

Returns true if self is OrdinaryParamDefined

Returns true if self is NumparamUsed

Returns true if self is TokAtEolWithoutExpression

Returns true if self is EndInMethod

Returns true if self is ComparisonAfterComparison

Returns true if self is CircularArgumentReference

Returns true if self is DynamicConstantAssignment

Returns true if self is CantAssignToSelf

Returns true if self is CantAssignToNil

Returns true if self is CantAssignToTrue

Returns true if self is CantAssignToFalse

Returns true if self is CantAssignToFile

Returns true if self is CantAssignToLine

Returns true if self is CantAssignToEncoding

Returns true if self is CantAssignToNumparam

Returns true if self is CantSetVariable

Returns true if self is BlockGivenToYield

Returns true if self is BlockAndBlockArgGiven

Returns true if self is SymbolLiteralWithInterpolation

Returns true if self is ReservedForNumparam

Returns true if self is KeyMustBeValidAsLocalVariable

Returns true if self is DuplicateVariableName

Returns true if self is DuplicateKeyName

Returns true if self is SingletonLiteral

Returns true if self is NthRefIsTooBig

Returns true if self is DuplicatedArgumentName

Returns true if self is RegexError

Returns true if self is InvalidSymbol

Returns true if self is VoidValueExpression

Casts self to Option<&FractionAfterNumeric>, return None if variant doesn’t match

Casts self to Option<&NoDigitsAfterDot>, return None if variant doesn’t match

Casts self to Option<&UnknownTypeOfPercentString>, return None if variant doesn’t match

Casts self to Option<&NumericLiteralWithoutDigits>, return None if variant doesn’t match

Casts self to Option<&UnterminatedList>, return None if variant doesn’t match

Casts self to Option<&UnterminatedRegexp>, return None if variant doesn’t match

Casts self to Option<&UnterminatedString>, return None if variant doesn’t match

Casts self to Option<&UnterminatedQuotedString>, return None if variant doesn’t match

Casts self to Option<&InvalidUnicodeEscape>, return None if variant doesn’t match

Casts self to Option<&TooLargeUnicodeCodepoint>, return None if variant doesn’t match

Casts self to Option<&InvalidUnicodeCodepoint>, return None if variant doesn’t match

Casts self to Option<&MultipleCodepointAtSingleChar>, return None if variant doesn’t match

Casts self to Option<&InvalidEscapeCharacter>, return None if variant doesn’t match

Casts self to Option<&InvalidHexEscape>, return None if variant doesn’t match

Casts self to Option<&UnterminatedHeredoc>, return None if variant doesn’t match

Casts self to Option<&UnterminatedHeredocId>, return None if variant doesn’t match

Casts self to Option<&SlashRAtMiddleOfLine>, return None if variant doesn’t match

Casts self to Option<&DStarInterpretedAsArgPrefix>, return None if variant doesn’t match

Casts self to Option<&StarInterpretedAsArgPrefix>, return None if variant doesn’t match

Casts self to Option<&AmpersandInterpretedAsArgPrefix>, return None if variant doesn’t match

Casts self to Option<&TripleDotAtEol>, return None if variant doesn’t match

Casts self to Option<&ParenthesesIterpretedAsArglist>, return None if variant doesn’t match

Casts self to Option<&AmbiguousFirstArgument>, return None if variant doesn’t match

Casts self to Option<&AmbiguousOperator>, return None if variant doesn’t match

Casts self to Option<&InvalidCharacterSyntax>, return None if variant doesn’t match

Casts self to Option<&InvalidOctalDigit>, return None if variant doesn’t match

Casts self to Option<&TrailingCharInNumber>, return None if variant doesn’t match

Casts self to Option<&EmbeddedDocumentMeetsEof>, return None if variant doesn’t match

Casts self to Option<&InvalidChar>, return None if variant doesn’t match

Casts self to Option<&IncompleteCharacterSyntax>, return None if variant doesn’t match

Casts self to Option<&GvarWithoutId>, return None if variant doesn’t match

Casts self to Option<&InvalidGvarName>, return None if variant doesn’t match

Casts self to Option<&IvarWithoutId>, return None if variant doesn’t match

Casts self to Option<&InvalidIvarName>, return None if variant doesn’t match

Casts self to Option<&CvarWithoutId>, return None if variant doesn’t match

Casts self to Option<&InvalidCvarName>, return None if variant doesn’t match

Casts self to Option<&UnknownRegexOptions>, return None if variant doesn’t match

Casts self to Option<&UnterminatedUnicodeEscape>, return None if variant doesn’t match

Casts self to Option<&EncodingError>, return None if variant doesn’t match

Casts self to Option<&InvalidMultibyteChar>, return None if variant doesn’t match

Casts self to Option<&AmbiguousTernaryOperator>, return None if variant doesn’t match

Casts self to Option<&AmbiguousRegexp>, return None if variant doesn’t match

Casts self to Option<&ElseWithoutRescue>, return None if variant doesn’t match

Casts self to Option<&BeginNotAtTopLevel>, return None if variant doesn’t match

Casts self to Option<&AliasNthRef>, return None if variant doesn’t match

Casts self to Option<&CsendInsideMasgn>, return None if variant doesn’t match

Casts self to Option<&ClassOrModuleNameMustBeConstant>, return None if variant doesn’t match

Casts self to Option<&EndlessSetterDefinition>, return None if variant doesn’t match

Casts self to Option<&UnexpectedToken>, return None if variant doesn’t match

Casts self to Option<&ClassDefinitionInMethodBody>, return None if variant doesn’t match

Casts self to Option<&ModuleDefinitionInMethodBody>, return None if variant doesn’t match

Casts self to Option<&InvalidReturnInClassOrModuleBody>, return None if variant doesn’t match

Casts self to Option<&ConstArgument>, return None if variant doesn’t match

Casts self to Option<&IvarArgument>, return None if variant doesn’t match

Casts self to Option<&GvarArgument>, return None if variant doesn’t match

Casts self to Option<&CvarArgument>, return None if variant doesn’t match

Casts self to Option<&NoSuchLocalVariable>, return None if variant doesn’t match

Casts self to Option<&OrdinaryParamDefined>, return None if variant doesn’t match

Casts self to Option<&NumparamUsed>, return None if variant doesn’t match

Casts self to Option<&TokAtEolWithoutExpression>, return None if variant doesn’t match

Casts self to Option<&EndInMethod>, return None if variant doesn’t match

Casts self to Option<&ComparisonAfterComparison>, return None if variant doesn’t match

Casts self to Option<&CircularArgumentReference>, return None if variant doesn’t match

Casts self to Option<&DynamicConstantAssignment>, return None if variant doesn’t match

Casts self to Option<&CantAssignToSelf>, return None if variant doesn’t match

Casts self to Option<&CantAssignToNil>, return None if variant doesn’t match

Casts self to Option<&CantAssignToTrue>, return None if variant doesn’t match

Casts self to Option<&CantAssignToFalse>, return None if variant doesn’t match

Casts self to Option<&CantAssignToFile>, return None if variant doesn’t match

Casts self to Option<&CantAssignToLine>, return None if variant doesn’t match

Casts self to Option<&CantAssignToEncoding>, return None if variant doesn’t match

Casts self to Option<&CantAssignToNumparam>, return None if variant doesn’t match

Casts self to Option<&CantSetVariable>, return None if variant doesn’t match

Casts self to Option<&BlockGivenToYield>, return None if variant doesn’t match

Casts self to Option<&BlockAndBlockArgGiven>, return None if variant doesn’t match

Casts self to Option<&SymbolLiteralWithInterpolation>, return None if variant doesn’t match

Casts self to Option<&ReservedForNumparam>, return None if variant doesn’t match

Casts self to Option<&KeyMustBeValidAsLocalVariable>, return None if variant doesn’t match

Casts self to Option<&DuplicateVariableName>, return None if variant doesn’t match

Casts self to Option<&DuplicateKeyName>, return None if variant doesn’t match

Casts self to Option<&SingletonLiteral>, return None if variant doesn’t match

Casts self to Option<&NthRefIsTooBig>, return None if variant doesn’t match

Casts self to Option<&DuplicatedArgumentName>, return None if variant doesn’t match

Casts self to Option<&RegexError>, return None if variant doesn’t match

Casts self to Option<&InvalidSymbol>, return None if variant doesn’t match

Casts self to Option<&VoidValueExpression>, return None if variant doesn’t match

Renders DiagnosticMessage by interpolating all dynamic values into a template

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.