pub enum Error {
Show 46 variants IO { action: &'static str, path: String, error: Error, }, Syntax { message: String, }, KeyMustBeNonOptional, KeyTypeNotSupported { kind: String, }, StructKeyContainsDisallowedType { struct_identifier: String, }, StructKeyMustBeCompact, MultipleCompilationModes, NotSupportedInCompilationMode { kind: String, identifier: String, mode: CompilationMode, }, OptionalsNotSupported { kind: String, }, StreamedParametersNotSupported, UnsupportedType { kind: String, mode: CompilationMode, }, DuplicateEnumeratorValue { enumerator_value: i128, }, EnumeratorCannotDeclareExplicitValue { enumerator_identifier: String, }, EnumeratorCannotDeclareAssociatedFields { enumerator_identifier: String, }, CannotUseOptionalUnderlyingType { enum_identifier: String, }, EnumeratorValueOutOfBounds { enumerator_identifier: String, value: i128, min: i128, max: i128, }, MustContainEnumerators { enum_identifier: String, }, EnumUnderlyingTypeNotSupported { enum_identifier: String, kind: Option<String>, }, ExceptionSpecificationNotSupported, StreamedMembersMustBeLast { parameter_identifier: String, }, ReturnTuplesMustContainAtLeastTwoElements, MultipleStreamedMembers, CompactStructCannotBeEmpty, CompactStructCannotContainTaggedFields, CannotHaveDuplicateTag { identifier: String, }, CannotTagClass { identifier: String, }, CannotTagContainingClass { identifier: String, }, TagValueOutOfBounds, TaggedMemberMustBeOptional { identifier: String, }, CompactIdOutOfBounds, Redefinition { identifier: String, }, SelfReferentialTypeAliasNeedsConcreteType { identifier: String, }, Shadows { identifier: String, }, TypeMismatch { expected: String, actual: String, is_concrete: bool, }, IntegerLiteralOverflows, InvalidIntegerLiteral { base: u32, }, InvalidCompilationMode { mode: String, }, InfiniteSizeCycle { type_id: String, cycle: String, }, DoesNotExist { identifier: String, }, ArgumentNotSupported { argument: String, directive: String, }, MissingRequiredArgument { argument: String, }, MissingRequiredAttribute { attribute: String, }, TooManyArguments { expected: String, }, UnexpectedAttribute { attribute: String, }, AttributeIsNotRepeatable { attribute: String, }, TypeAliasOfOptional,
}

Variants§

§

IO

Fields

§action: &'static str
§path: String
§error: Error
§

Syntax

Fields

§message: String
§

KeyMustBeNonOptional

Dictionaries cannot use optional types as keys.

§

KeyTypeNotSupported

Fields

§kind: String

The type and/or identifier of the type that was used as a dictionary key type.

An unsupported type was used as a dictionary key type.

§

StructKeyContainsDisallowedType

Fields

§struct_identifier: String

The identifier of the struct.

Struct contains a field that cannot be used as a dictionary key type.

§

StructKeyMustBeCompact

Structs must be compact to be used as a dictionary key type.

§

MultipleCompilationModes

The user specified the compilation mode multiple times in a single Slice file.

§

NotSupportedInCompilationMode

Fields

§kind: String

The kind that is not supported.

§identifier: String

The identifier of the kind that is not supported.

§mode: CompilationMode

The compilation mode the construct was defined in.

A Slice construct was defined in a compilation mode that it isn’t supported by.

§

OptionalsNotSupported

Fields

§kind: String

The kind that is not supported.

Optionals of this kind cannot be used in Slice1 mode.

§

StreamedParametersNotSupported

Streamed parameters cannot be used in Slice1 mode.

§

UnsupportedType

Fields

§kind: String

The kind that was used.

§mode: CompilationMode

The compilation mode the type was used in.

A slice type was used in a compilation mode that it isn’t supported by.

§

DuplicateEnumeratorValue

Fields

§enumerator_value: i128

The value of the enumerator that was already used.

Enumerator values must be unique.

§

EnumeratorCannotDeclareExplicitValue

Fields

§enumerator_identifier: String

Enumerators cannot declare explicit values when their enclosing enum doesn’t have an underlying type.

§

EnumeratorCannotDeclareAssociatedFields

Fields

§enumerator_identifier: String

Enumerators cannot declare associated fields when their enclosing enum has an underlying type.

§

CannotUseOptionalUnderlyingType

Fields

§enum_identifier: String

The identifier of the enum.

Enums cannot have optional underlying types.

§

EnumeratorValueOutOfBounds

Fields

§enumerator_identifier: String

The identifier of the enumerator.

§value: i128

The value of the out of bounds enumerator.

§min: i128

The minimum value of the underlying type of the enum.

§max: i128

The maximum value of the underlying type of the enum.

An enumerator was found that was out of bounds of the underlying type of the parent enum.

§

MustContainEnumerators

Fields

§enum_identifier: String

The identifier of the enum.

Enums must be contain at least one enumerator.

§

EnumUnderlyingTypeNotSupported

Fields

§enum_identifier: String

The identifier of the enum.

§kind: Option<String>

The name of the non-integral type that was used as the underlying type of the enum.

Enum underlying types must be integral types.

§

ExceptionSpecificationNotSupported

Exception specifications can only be used in Slice1 mode.

§

StreamedMembersMustBeLast

Fields

§parameter_identifier: String

The identifier of the parameter that caused the error.

A streamed parameter was not the last parameter in the operation.

§

ReturnTuplesMustContainAtLeastTwoElements

Return tuples for an operation must contain at least two element.

§

MultipleStreamedMembers

Multiple streamed parameters were used as parameters for an operation.

§

CompactStructCannotBeEmpty

Compact structs cannot be empty.

§

CompactStructCannotContainTaggedFields

Compact structs cannot contain tagged fields.

§

CannotHaveDuplicateTag

Fields

§identifier: String

The identifier of the tagged member.

A duplicate tag value was found.

§

CannotTagClass

Fields

§identifier: String

The identifier of the tagged member.

Cannot tag a class.

§

CannotTagContainingClass

Fields

§identifier: String

The identifier of the tagged member.

Cannot tag a member that contains a class.

§

TagValueOutOfBounds

A tag value was not in the expected range, 0 .. i32::MAX.

§

TaggedMemberMustBeOptional

Fields

§identifier: String

The identifier of the tagged member.

A tagged member was not set to optional.

§

CompactIdOutOfBounds

A compact ID was not in the expected range, 0 .. i32::MAX.

§

Redefinition

Fields

§identifier: String

The identifier that was redefined.

An identifier was redefined.

§

SelfReferentialTypeAliasNeedsConcreteType

Fields

§identifier: String

The name of the type alias.

A self-referential type alias has no concrete type.

§

Shadows

Fields

§identifier: String

The identifier that is shadowing a previously defined identifier.

An identifier was used to shadow another identifier.

§

TypeMismatch

Fields

§expected: String

The name of the expected kind.

§actual: String

The name of the found kind.

§is_concrete: bool

Whether the expected type was a concrete type (true) or a trait type (false).

Used to indicate when two types should match, but do not.

§

IntegerLiteralOverflows

An integer literal was outside the parsable range of 0..i128::MAX.

§

InvalidIntegerLiteral

Fields

§base: u32

The base of the integer literal; Ex: 16 (hex), 10 (dec).

An integer literal contained illegal characters for its base.

§

InvalidCompilationMode

Fields

§mode: String

The compilation mode that was specified.

An invalid compilation mode was specified.

§

InfiniteSizeCycle

Fields

§type_id: String

The type id of the type that caused the error.

§cycle: String

The cycle that was found.

An self-referential type had an infinite size cycle.

§

DoesNotExist

Fields

§identifier: String

The identifier that was not found.

No element with the specified identifier was found.

§

ArgumentNotSupported

Fields

§argument: String

The argument that was provided.

§directive: String

The directive it was provided to.

An invalid argument was provided to an attribute directive.

§

MissingRequiredArgument

Fields

§argument: String
§

MissingRequiredAttribute

Fields

§attribute: String
§

TooManyArguments

Fields

§expected: String
§

UnexpectedAttribute

Fields

§attribute: String
§

AttributeIsNotRepeatable

Fields

§attribute: String
§

TypeAliasOfOptional

A type alias had an optional underlying type.

Implementations§

source§

impl Error

source

pub fn code(&self) -> &str

source

pub fn message(&self) -> String

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

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

impl From<Error> for DiagnosticKind

source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.