Enum slicec::diagnostics::Error
source · 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
Syntax
KeyMustBeNonOptional
Dictionaries cannot use optional types as keys.
KeyTypeNotSupported
An unsupported type was used as a dictionary key type.
StructKeyContainsDisallowedType
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
mode: CompilationModeThe compilation mode the construct was defined in.
A Slice construct was defined in a compilation mode that it isn’t supported by.
OptionalsNotSupported
Optionals of this kind cannot be used in Slice1 mode.
StreamedParametersNotSupported
Streamed parameters cannot be used in Slice1 mode.
UnsupportedType
Fields
mode: CompilationModeThe compilation mode the type was used in.
A slice type was used in a compilation mode that it isn’t supported by.
DuplicateEnumeratorValue
Enumerator values must be unique.
EnumeratorCannotDeclareExplicitValue
Enumerators cannot declare explicit values when their enclosing enum doesn’t have an underlying type.
EnumeratorCannotDeclareAssociatedFields
Enumerators cannot declare associated fields when their enclosing enum has an underlying type.
CannotUseOptionalUnderlyingType
Enums cannot have optional underlying types.
EnumeratorValueOutOfBounds
Fields
An enumerator was found that was out of bounds of the underlying type of the parent enum.
MustContainEnumerators
Enums must be contain at least one enumerator.
EnumUnderlyingTypeNotSupported
Fields
Enum underlying types must be integral types.
ExceptionSpecificationNotSupported
Exception specifications can only be used in Slice1 mode.
StreamedMembersMustBeLast
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
A duplicate tag value was found.
CannotTagClass
Cannot tag a class.
CannotTagContainingClass
Cannot tag a member that contains a class.
TagValueOutOfBounds
A tag value was not in the expected range, 0 .. i32::MAX.
TaggedMemberMustBeOptional
A tagged member was not set to optional.
CompactIdOutOfBounds
A compact ID was not in the expected range, 0 .. i32::MAX.
Redefinition
An identifier was redefined.
SelfReferentialTypeAliasNeedsConcreteType
A self-referential type alias has no concrete type.
Shadows
An identifier was used to shadow another identifier.
TypeMismatch
Fields
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
An integer literal contained illegal characters for its base.
InvalidCompilationMode
An invalid compilation mode was specified.
InfiniteSizeCycle
Fields
An self-referential type had an infinite size cycle.
DoesNotExist
No element with the specified identifier was found.
ArgumentNotSupported
Fields
An invalid argument was provided to an attribute directive.
MissingRequiredArgument
MissingRequiredAttribute
TooManyArguments
UnexpectedAttribute
AttributeIsNotRepeatable
TypeAliasOfOptional
A type alias had an optional underlying type.