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
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
name: String
The name of the missing instruction.
An instruction type could not be found in the instruction set.
FoundConditionInCommands
Fields
command_type: String
The type of the command.
A XIO condition was found where only a command is allowed.
CommandWithoutTimeExtentButConditions
Fields
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
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
command_type: String
The command type which was found.
The instruction of a command was from a different category.
ParametersInGroupAreOfDifferentTypes
Fields
group: String
The name of the group.
Parameters inside a group don’t have the same type.
WrongParameters
Fields
Parameters for a XIO command were wrong.
ParameterStorageDoesNotFit
Fields
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
sourceimpl Fail for ErrorKind
impl Fail for ErrorKind
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Backtrace
carried by this failure, if it
carries one. Read more