pub enum DiagCode {
Show 182 variants
UnexpectedCharacter,
UnterminatedString,
UnterminatedHexBinStr,
MissingHexBinSuffix,
HexStringMul2,
BinStringMul8,
IdentifierUnderscore,
IdentifierHyphenEnd,
IdentifierLength64,
IdentifierLength32,
BadIdentifierCase,
ParseError,
InvalidU32,
InvalidI64,
KeywordReserved,
InvalidHexRange,
NumberLeadingZero,
MissingComma,
MissingModuleIdentity,
RevisionLastUpdated,
RevisionNotDescending,
RevisionAfterUpdate,
DateCharacter,
DateLength,
DateMonth,
DateDay,
DateHour,
DateMinutes,
DateValue,
DateYear2Digits,
DateInFuture,
DateInPast,
UnknownDefinitionType,
UnknownTypeSyntax,
UnknownConstraintType,
UnknownRangeValue,
UnknownOidComponent,
UnknownDefvalType,
BitsNumberNegative,
BitsNumberTooLarge,
BitsNumberLarge,
EnumZero,
EnumNameRedefinition,
EnumValueRedefinition,
BitsNameRedefinition,
BitsValueRedefinition,
ModuleIdentityNotFirst,
ModuleIdentityMultiple,
MacroNotImported,
EmptyDescription,
EmptyReference,
EmptyOrganization,
EmptyContact,
EmptyUnits,
EmptyFormat,
ModuleNameSuffix,
MacroNotAllowed,
ChoiceNotAllowed,
TaggedTypeNotAllowed,
ImportNotFound,
ImportModuleNotFound,
TypeUnknown,
OidOrphan,
IndexUnresolved,
ObjectsUnresolved,
IdentifierHyphenSMIv2,
GroupNotAccessible,
NotifObjectNotObject,
NotifObjectAccess,
NotifNotReversible,
NotifIdTooLarge,
MalformedHexDefval,
MalformedBinDefval,
DefvalUnresolved,
VariationAccessNotifOnly,
GroupMemberUnresolved,
IndexNotObject,
AugmentsNotObject,
AugmentNested,
NotifNoOid,
PrimitiveTypeMissing,
IntegerInSMIv2,
IndexIntegerNoRange,
IndexNegativeRange,
DefvalBasetype,
DefvalRange,
DefvalEnum,
DefvalBits,
CounterDefvalIllegal,
IndexCounterIllegal,
RangeBounds,
RangeExchanged,
RangeOverlap,
RangeAscending,
SizeIllegal,
RangeIllegal,
CounterRangeIllegal,
SubtypeEnumIllegal,
SubtypeBitsIllegal,
ParentTable,
ParentRow,
ParentColumn,
ParentScalar,
ParentNode,
ParentNotification,
ParentGroup,
ParentCompliance,
ParentCapabilities,
RowSubidentifierOne,
IndexElementNoSize,
IndexIllegalBasetype,
LastSubidZero,
OidRecursive,
OidRegistered,
OidReuse,
SequenceNoColumn,
SequenceMissingColumn,
SequenceOrder,
SequenceTypeMismatch,
IndexExceedsTooLarge,
AccessInvalidSMIv1,
AccessWriteOnlySMIv2,
AccessTableIllegal,
AccessRowIllegal,
AccessCounterIllegal,
ScalarNotCreatable,
MaxAccessInSMIv1,
AccessInSMIv2,
StatusInvalidSMIv1,
StatusInvalidSMIv2,
TypeStatusDeprecated,
TypeStatusObsolete,
GroupMembership,
GroupMemberMixed,
GroupObjectsNotification,
GroupNotificationsObject,
GroupObjectStatus,
ComplianceGroupStatus,
ComplianceObjectStatus,
ComplianceGroupInvalid,
RefinementExists,
OptionalGroupExists,
RefinementNotListed,
ComplianceMemberNotLocal,
TimeticksRangeIllegal,
StatusInvalidCapabilities,
ImportDuplicate,
ImportUnused,
BasetypeNotImported,
DescriptionMissing,
TCNested,
TypeAssignmentSMIv2,
TableNameTable,
RowNameEntry,
RowNameTableName,
NamedNumbersAscending,
HyphenInLabel,
OpaqueSMIv2,
InvalidFormat,
TypeWithoutFormat,
TypeUnreferenced,
GroupUnreferenced,
ObsoleteImport,
IdentifierCaseMatch,
TrapInSMIv2,
NodeImplicit,
ModuleIdentityReg,
RowStatusDefault,
RowStatusAccess,
StorageTypeDefault,
TAddressTDomain,
IndexAccessible,
IndexNotAccessible,
IndexDefval,
AccessWriteOnlySMIv1,
IpAddressInSyntax,
InetAddressPairing,
InetAddressTypeSubtyped,
InetAddressSpecific,
TransportAddressPairing,
TransportAddressTypeSubtyped,
TransportAddressSpecific,
}Expand description
Identifies a specific diagnostic condition.
Each code has a fixed Severity and belongs to a pipeline phase
(lexer, parser, lower, or resolver). Use DiagCode::as_code for the
stable kebab-case string representation.
Variants§
UnexpectedCharacter
UnterminatedString
UnterminatedHexBinStr
MissingHexBinSuffix
HexStringMul2
BinStringMul8
IdentifierUnderscore
IdentifierHyphenEnd
IdentifierLength64
IdentifierLength32
BadIdentifierCase
ParseError
InvalidU32
InvalidI64
KeywordReserved
InvalidHexRange
NumberLeadingZero
MissingComma
MissingModuleIdentity
RevisionLastUpdated
RevisionNotDescending
RevisionAfterUpdate
DateCharacter
DateLength
DateMonth
DateDay
DateHour
DateMinutes
DateValue
DateYear2Digits
DateInFuture
DateInPast
UnknownDefinitionType
UnknownTypeSyntax
UnknownConstraintType
UnknownRangeValue
UnknownOidComponent
UnknownDefvalType
BitsNumberNegative
BitsNumberTooLarge
BitsNumberLarge
EnumZero
EnumNameRedefinition
EnumValueRedefinition
BitsNameRedefinition
BitsValueRedefinition
ModuleIdentityNotFirst
ModuleIdentityMultiple
MacroNotImported
EmptyDescription
EmptyReference
EmptyOrganization
EmptyContact
EmptyUnits
EmptyFormat
ModuleNameSuffix
MacroNotAllowed
ChoiceNotAllowed
TaggedTypeNotAllowed
ImportNotFound
ImportModuleNotFound
TypeUnknown
OidOrphan
IndexUnresolved
ObjectsUnresolved
IdentifierHyphenSMIv2
GroupNotAccessible
NotifObjectNotObject
NotifObjectAccess
NotifNotReversible
NotifIdTooLarge
MalformedHexDefval
MalformedBinDefval
DefvalUnresolved
VariationAccessNotifOnly
GroupMemberUnresolved
IndexNotObject
AugmentsNotObject
AugmentNested
NotifNoOid
PrimitiveTypeMissing
IntegerInSMIv2
IndexIntegerNoRange
IndexNegativeRange
DefvalBasetype
DefvalRange
DefvalEnum
DefvalBits
CounterDefvalIllegal
IndexCounterIllegal
RangeBounds
RangeExchanged
RangeOverlap
RangeAscending
SizeIllegal
RangeIllegal
CounterRangeIllegal
SubtypeEnumIllegal
SubtypeBitsIllegal
ParentTable
ParentRow
ParentColumn
ParentScalar
ParentNode
ParentNotification
ParentGroup
ParentCompliance
ParentCapabilities
RowSubidentifierOne
IndexElementNoSize
IndexIllegalBasetype
LastSubidZero
OidRecursive
OidRegistered
OidReuse
SequenceNoColumn
SequenceMissingColumn
SequenceOrder
SequenceTypeMismatch
IndexExceedsTooLarge
AccessInvalidSMIv1
AccessWriteOnlySMIv2
AccessTableIllegal
AccessRowIllegal
AccessCounterIllegal
ScalarNotCreatable
MaxAccessInSMIv1
AccessInSMIv2
StatusInvalidSMIv1
StatusInvalidSMIv2
TypeStatusDeprecated
TypeStatusObsolete
GroupMembership
GroupMemberMixed
GroupObjectsNotification
GroupNotificationsObject
GroupObjectStatus
ComplianceGroupStatus
ComplianceObjectStatus
ComplianceGroupInvalid
RefinementExists
OptionalGroupExists
RefinementNotListed
ComplianceMemberNotLocal
TimeticksRangeIllegal
StatusInvalidCapabilities
ImportDuplicate
ImportUnused
BasetypeNotImported
DescriptionMissing
TCNested
TypeAssignmentSMIv2
TableNameTable
RowNameEntry
RowNameTableName
NamedNumbersAscending
HyphenInLabel
OpaqueSMIv2
InvalidFormat
TypeWithoutFormat
TypeUnreferenced
GroupUnreferenced
ObsoleteImport
IdentifierCaseMatch
TrapInSMIv2
NodeImplicit
ModuleIdentityReg
RowStatusDefault
RowStatusAccess
StorageTypeDefault
TAddressTDomain
IndexAccessible
IndexNotAccessible
IndexDefval
AccessWriteOnlySMIv1
IpAddressInSyntax
InetAddressPairing
InetAddressTypeSubtyped
InetAddressSpecific
TransportAddressPairing
TransportAddressTypeSubtyped
TransportAddressSpecific
Implementations§
Trait Implementations§
impl Copy for DiagCode
impl Eq for DiagCode
impl StructuralPartialEq for DiagCode
Auto Trait Implementations§
impl Freeze for DiagCode
impl RefUnwindSafe for DiagCode
impl Send for DiagCode
impl Sync for DiagCode
impl Unpin for DiagCode
impl UnsafeUnpin for DiagCode
impl UnwindSafe for DiagCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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