pub enum Classification {
Show 64 variants
Unclassified,
NotYetImplemented,
IllegalValue,
IllegalValueInHint,
IllegalUri,
IllegalGlob,
Deprecation,
Versioning,
Experimental,
Proto,
ProtoParseFailed,
ProtoMissingField,
ProtoAny,
ProtoMissingAnyDeclaration,
Yaml,
YamlResolutionDisabled,
YamlResolutionFailed,
YamlParseFailed,
YamlSchemaValidationFailed,
YamlMissingKey,
YamlMissingElement,
YamlInvalidType,
YamlCyclicDependency,
Link,
LinkMissingAnchor,
LinkAnchorZero,
LinkMissingTypeVariationNameAndClass,
LinkUnresolvedName,
LinkAmbiguousName,
LinkDuplicateDefinition,
LinkCompoundVsSimpleFunctionName,
Type,
TypeUnknown,
TypeMismatchedParameters,
TypeMismatchedFieldNameAssociations,
TypeInvalidSwizzle,
TypeMismatch,
TypeStructRequired,
TypeMismatchedVariation,
TypeMismatchedNullability,
TypeDerivationInvalid,
TypeDerivationFailed,
TypeParseError,
TypeResolutionError,
TypeInvalidFieldName,
TypeDerivationNotSupported,
Relation,
RelationRootMissing,
RelationMissing,
RelationInvalid,
Expression,
ExpressionFieldRefMissingStream,
ExpressionIllegalLiteralValue,
ExpressionFunctionDefinitionUnavailable,
ExpressionIllegalSubquery,
Redundant,
RedundantProtoAnyDeclaration,
RedundantExtensionDefition,
RedundantFunctionDeclaration,
RedundantTypeDeclaration,
RedundantTypeVariationDeclaration,
RedundantListSlice,
RedundantField,
RedundantEnumVariant,
}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
Versioning
Experimental
Proto
ProtoParseFailed
ProtoMissingField
ProtoAny
ProtoMissingAnyDeclaration
Yaml
YamlResolutionDisabled
YamlResolutionFailed
YamlParseFailed
YamlSchemaValidationFailed
YamlMissingKey
YamlMissingElement
YamlInvalidType
YamlCyclicDependency
Link
LinkMissingAnchor
LinkAnchorZero
LinkMissingTypeVariationNameAndClass
LinkUnresolvedName
LinkAmbiguousName
LinkDuplicateDefinition
LinkCompoundVsSimpleFunctionName
Type
TypeUnknown
TypeMismatchedParameters
TypeMismatchedFieldNameAssociations
TypeInvalidSwizzle
TypeMismatch
TypeStructRequired
TypeMismatchedVariation
TypeMismatchedNullability
TypeDerivationInvalid
TypeDerivationFailed
TypeParseError
TypeResolutionError
TypeInvalidFieldName
TypeDerivationNotSupported
Relation
RelationRootMissing
RelationMissing
RelationInvalid
Expression
ExpressionFieldRefMissingStream
ExpressionIllegalLiteralValue
ExpressionFunctionDefinitionUnavailable
ExpressionIllegalSubquery
Redundant
RedundantProtoAnyDeclaration
RedundantExtensionDefition
RedundantFunctionDeclaration
RedundantTypeDeclaration
RedundantTypeVariationDeclaration
RedundantListSlice
RedundantField
RedundantEnumVariant
Implementations
sourceimpl Classification
impl Classification
sourcepub fn group_code(&self) -> u32
pub fn group_code(&self) -> u32
Returns the group code for this classification.
sourcepub fn group(&self) -> Classification
pub fn group(&self) -> Classification
Returns the group variant for this classification.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the description of this classification.
sourcepub fn from_code(code: u32) -> Option<Self>
pub fn from_code(code: u32) -> Option<Self>
Returns the classification associated with the given code, if any.
sourcepub fn group_from_code(code: u32) -> Option<Self>
pub fn group_from_code(code: u32) -> Option<Self>
Returns the group classification associated with the given code, if any.
sourcepub fn from_group(group: u32) -> Option<Self>
pub fn from_group(group: u32) -> Option<Self>
Returns the group classification associated with the given group.
sourcepub fn parent(code: u32) -> u32
pub fn parent(code: u32) -> u32
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.
sourcepub fn format_message(&self, message: &Message, f: &mut Formatter<'_>) -> Result
pub fn format_message(&self, message: &Message, f: &mut Formatter<'_>) -> Result
Formats a Message with this classification.
Trait Implementations
sourceimpl Clone for Classification
impl Clone for Classification
sourcefn clone(&self) -> Classification
fn clone(&self) -> Classification
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for Classification
impl Debug for Classification
sourceimpl Default for Classification
impl Default for Classification
sourceimpl EnumProperty for Classification
impl EnumProperty for Classification
sourceimpl From<Classification> for u32
impl From<Classification> for u32
sourcefn from(classification: Classification) -> Self
fn from(classification: Classification) -> Self
Converts a Classification into its error code.
sourceimpl FromPrimitive for Classification
impl FromPrimitive for Classification
sourcefn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourcefn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moresourceimpl Hash for Classification
impl Hash for Classification
sourceimpl IntoEnumIterator for Classification
impl IntoEnumIterator for Classification
type Iterator = ClassificationIter
fn iter() -> ClassificationIterⓘNotable traits for ClassificationIterimpl Iterator for ClassificationIter type Item = Classification;
sourceimpl PartialEq<Classification> for Classification
impl PartialEq<Classification> for Classification
sourcefn eq(&self, other: &Classification) -> bool
fn eq(&self, other: &Classification) -> bool
impl Copy for Classification
impl Eq for Classification
impl StructuralEq for Classification
impl StructuralPartialEq for Classification
Auto Trait Implementations
impl RefUnwindSafe for Classification
impl Send for Classification
impl Sync for Classification
impl Unpin for Classification
impl UnwindSafe for Classification
Blanket Implementations
impl<T> AnyExt for Twhere
T: Any + ?Sized,
impl<T> AnyExt for Twhere
T: Any + ?Sized,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referencefn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referencefn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerfn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerfn downcast_box<T>(
this: Box<Self, Global>
) -> Result<Box<T, Global>, Box<Self, Global>>where
T: Any,
fn downcast_box<T>(
this: Box<Self, Global>
) -> Result<Box<T, Global>, Box<Self, Global>>where
T: Any,
T behind Box pointerfn downcast_move<T>(this: Self) -> Option<T>where
T: Any,
fn downcast_move<T>(this: Self) -> Option<T>where
T: Any,
Self to T,
useful only in generic context as a workaround for specialization Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X, Global>) -> Box<T, Global>ⓘNotable traits for Box<W, Global>impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<R> Read for Box<R, Global>where
R: Read + ?Sized,impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
W: Write + ?Sized,impl<R> Read for Box<R, Global>where
R: Read + ?Sized,impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.