pub enum ErrorKind {
Show 25 variants ParameterAlreadyDescribed { name: String, original_layer: String, offending_layer: String, }, ParameterNotYetDescribed { name: String, layer: String, }, ParameterOverrideEnforceNotRespected { name: String, layer: String, }, ParameterOverrideForbidNotSatisfied { name: String, layer: String, }, ParameterOverrideNotAllowed { name: String, layer: String, }, ParameterTypeMismatch { name: String, defined_type: DataType, defined_layer: String, value: DataValueDescriptive, value_layer: String, }, ParameterWithFixedStorageAndNoValue { name: String, }, MappedParameterNotFound { name: String, }, ParameterNotFound { name: String, }, ParameterNotMappedInHardwareAssignment { name: String, hardware_board: String, }, CapabilityNotFound { name: String, parameter_name: String, hardware_board: String, }, ModuleDescriptionNotFound { name: String, parameter_name: String, capability_name: String, hardware_board: String, }, ModuleChannelNotFound { name: String, module_name: String, parameter_name: String, }, ChannelDataTypeMismatch { index: u16, name: String, module_name: String, required_datatype: DataType, found_datatype: DataType, parameter_name: String, }, InvalidDataType { name: String, }, InstructionNotFound { location: CodeLocation, name: String, }, FoundConditionInCommands { location: CodeLocation, command_type: String, }, CommandWithoutTimeExtentButConditions { location: CodeLocation, command_type: String, }, CommandWithTimeExtentButNoConditions { location: CodeLocation, command_type: String, }, InvalidInstructionCategory { location: CodeLocation, command_type: String, }, ParametersInGroupAreOfDifferentTypes { location: CodeLocation, parameters: BTreeSet<String>, group: String, }, WrongParameters { location: CodeLocation, found: BTreeSet<String>, required: BTreeSet<String>, }, ParameterStorageDoesNotFit { location: CodeLocation, name: String, required_storage: StorageTypeWithMixed, found_storage: StorageType, }, ProgrammerError { msg: String, }, XioBaseDatatypes,
}
Expand description

An enum containing all error kinds produced by this crate.

Variants

ParameterAlreadyDescribed

Fields

name: String

The name of the parameter in question.

original_layer: String

The layer where the parameter was described first.

offending_layer: String

The layer where the parameter gets redefined.

A parameter was already described in a lower layer.

It can not be overwritten in a higher layer.

ParameterNotYetDescribed

Fields

name: String

The name of the parameter.

layer: String

The layer in which a definition was found.

A parameter value is defined, but was not yet described.

A lower or the same layer must contain a description of the parameter before it gets used. This description is missing at the layer where the parameter value is defined.

ParameterOverrideEnforceNotRespected

Fields

name: String

The name of the parameter which requires override.

layer: String

The layer where the parameter is described.

A parameter value override is enforced, but not found.

Parameters with override=enforce must be defined at a higher layer, but no such definition was found.

ParameterOverrideForbidNotSatisfied

Fields

name: String

The name of the parameter.

layer: String

The layer where the parameter was overridden.

A parameter was overridden although it must not be.

Parameters with override=forbid must have their value defined in the same layer as the parameter description. A parameter was overridden in a different layer.

ParameterOverrideNotAllowed

Fields

name: String

The name of the parameter.

layer: String

The layer where the parameter was overridden.

A parameter was overridden although it must not be.

ParameterTypeMismatch

Fields

name: String

The name of the parameter.

defined_type: DataType

The type defined in the parameter description.

defined_layer: String

The layer where the parameter was described.

value: DataValueDescriptive

The value which was found for the parameter.

value_layer: String

The layer where the parameter value was defined.

A parameter did not match the required type.

ParameterWithFixedStorageAndNoValue

Fields

name: String

The name of the parameter

A parameter which gets stored in fixed storage has no value.

Parameters stored in fixed storage (which means const values) must have a fixed value assigned. No value assignment was found.

MappedParameterNotFound

Fields

name: String

The name of the missing parameter.

A parameter which was referenced by a mask does not exist.

ParameterNotFound

Fields

name: String

The name of the missing parameter.

A parameter was not found.

ParameterNotMappedInHardwareAssignment

Fields

name: String

The name of the parameter.

hardware_board: String

The hardware board.

No hardware mapping was found for a channel parameter.

Channel parameters must have a XIO hardware channel assigned in the hardware assignment. This assignment was not found.

CapabilityNotFound

Fields

name: String

The name of the capability.

parameter_name: String

The parameter which requires the capability.

hardware_board: String

The hardware board which is missing the capability.

A required capability was not found.

ModuleDescriptionNotFound

Fields

name: String

The module name.

parameter_name: String

The name of the parameter which requires the module.

capability_name: String

The name of the capability.

hardware_board: String

The hardware board which is missing the module.

A module description was not found.

ModuleChannelNotFound

Fields

name: String

The name of the channel.

module_name: String

The name of the module.

parameter_name: String

The name of the parameter.

A channel with a certain name is not present in the module.

ChannelDataTypeMismatch

Fields

index: u16

The index of the channel within the module.

name: String

The name of the mapped channel.

module_name: String

The name of the module.

required_datatype: DataType

The required data type.

found_datatype: DataType

The data type of the parameter value.

parameter_name: String

The name of the parameter.

A channel parameter datatype did not match.

InvalidDataType

Fields

name: String

The name of the parameter.

A parameter has an invalid data type.

InstructionNotFound

Fields

location: CodeLocation

The code location in question.

name: String

The name of the missing instruction.

An instruction type could not be found in the instruction set.

FoundConditionInCommands

Fields

location: CodeLocation

The code location in question.

command_type: String

The type of the command.

A XIO condition was found where only a command is allowed.

CommandWithoutTimeExtentButConditions

Fields

location: CodeLocation

The code location in question.

command_type: String

The type of the command.

A XIO command without time extent but with conditions was found.

XIO commands which have no time extent must not have a condition, but such a command was found with a condition attached to it.

CommandWithTimeExtentButNoConditions

Fields

location: CodeLocation

The code location in question.

command_type: String

The type of the command.

A XIO command with time extent but without conditions was found.

XIO commands which have a time extent require at least one condition, but such a command was found without a condition attached to it.

InvalidInstructionCategory

Fields

location: CodeLocation

The code location in question.

command_type: String

The command type which was found.

The instruction of a command was from a different category.

ParametersInGroupAreOfDifferentTypes

Fields

location: CodeLocation

The code location in question.

parameters: BTreeSet<String>

The set of parameters which have different types.

group: String

The name of the group.

Parameters inside a group don’t have the same type.

WrongParameters

Fields

location: CodeLocation

The code location in question.

found: BTreeSet<String>

The set of parameters which were found.

required: BTreeSet<String>

The set of parameters which are required.

Parameters for a XIO command were wrong.

ParameterStorageDoesNotFit

Fields

location: CodeLocation

The code location in question.

name: String

The name of the parameter.

required_storage: StorageTypeWithMixed

The required storage type constraint.

found_storage: StorageType

The storage which was found.

The storage of a parameter does not fit what was required.

ProgrammerError

Fields

msg: String

A message describing the error.

An error occurred which is probably a programmer mistake.

XioBaseDatatypes

An error occurred in the xio_base_datatypes crate.

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
Formats the value using the given formatter. Read more
Returns the “name” of the error. Read more
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
Provides context for this failure. Read more
Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Converts a reference to Self into a dynamic trait object of Fail.
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
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. 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.