pub enum Classification {
Show 53 variants Unclassified, NotYetImplemented, IllegalValue, IllegalValueInHint, IllegalUri, IllegalGlob, Deprecation, Experimental, Proto, ProtoParseFailed, ProtoMissingField, ProtoAny, ProtoMissingAnyDeclaration, Yaml, YamlResolutionDisabled, YamlResolutionFailed, YamlParseFailed, YamlSchemaValidationFailed, YamlMissingKey, YamlMissingElement, YamlInvalidType, Link, LinkMissingAnchor, LinkMissingFunctionName, LinkMissingTypeName, LinkMissingTypeVariationName, LinkAnchorZero, Type, TypeUnknown, TypeMismatchedParameters, TypeMismatchedFieldNameAssociations, TypeInvalidSwizzle, TypeMismatch, TypeStructRequired, TypeMismatchedVariation, TypeMismatchedNullability, Relation, RelationRootMissing, RelationMissing, RelationInvalid, Expression, ExpressionFieldRefMissingStream, ExpressionIllegalLiteralValue, ExpressionFunctionDefinitionUnavailable, ExpressionIllegalSubquery, Redundant, RedundantProtoAnyDeclaration, RedundantExtensionDefition, RedundantFunctionDeclaration, RedundantTypeDeclaration, RedundantTypeVariationDeclaration, RedundantListSlice, RedundantField,
}
Expand description

Enumeration for the particular types of diagnostics we might encounter.

Numbers must be assigned as follows:

  • the group identifier is represented by the thousands digit and up;
  • the first classification for each group (i.e. divisible by 1000) is reserved for diagnostics that have no more specific information attached to them: their description must be hidden and related to the group name;
  • group 0 is a sort of null group, where no group information is known;
  • all enum variant names for classifications belonging to a group (except the null group) must be prefixed by the group name;
  • for backward/forward-compatibility, numbers should not be reassigned.

The Description and HiddenDescription enum properties define a description of the class. When Description is used, the description is prefixed before the error message; when HiddenDescription is used, the message is not prefixed, and should thus be sufficiently specific to not need it. The latter is useful to reduce the amount of redundant information in a message.

Variants

Unclassified

NotYetImplemented

IllegalValue

IllegalValueInHint

IllegalUri

IllegalGlob

Deprecation

Experimental

Proto

ProtoParseFailed

ProtoMissingField

ProtoAny

ProtoMissingAnyDeclaration

Yaml

YamlResolutionDisabled

YamlResolutionFailed

YamlParseFailed

YamlSchemaValidationFailed

YamlMissingKey

YamlMissingElement

YamlInvalidType

LinkMissingAnchor

LinkMissingFunctionName

LinkMissingTypeName

LinkMissingTypeVariationName

LinkAnchorZero

Type

TypeUnknown

TypeMismatchedParameters

TypeMismatchedFieldNameAssociations

TypeInvalidSwizzle

TypeMismatch

TypeStructRequired

TypeMismatchedVariation

TypeMismatchedNullability

Relation

RelationRootMissing

RelationMissing

RelationInvalid

Expression

ExpressionFieldRefMissingStream

ExpressionIllegalLiteralValue

ExpressionFunctionDefinitionUnavailable

ExpressionIllegalSubquery

Redundant

RedundantProtoAnyDeclaration

RedundantExtensionDefition

RedundantFunctionDeclaration

RedundantTypeDeclaration

RedundantTypeVariationDeclaration

RedundantListSlice

RedundantField

Implementations

Returns the complete code for this classification.

Returns the name of the classiciation.

Returns the group code for this classification.

Returns the group variant for this classification.

Returns the code for this classification within its group.

Returns the description of this classification.

Returns the classification associated with the given code, if any.

Returns the group classification associated with the given code, if any.

Returns the group classification associated with the given group.

Returns the “parent” code for the given code. For non-group codes, this is the code of their group (code rounded down to thousands). For group codes, this is 0.

Formats a Message with this classification.

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

Returns the “default value” for a type. Read more

Converts a Classification into its error code.

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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

Returns the argument unchanged.

Calls U::from(self).

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

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)

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.