Enum rustdds::Error [−][src]
pub enum Error {
Show 13 variants
BadParameter {
reason: String,
},
Unsupported,
OutOfResources,
NotEnabled,
ImmutablePolicy,
InconsistentPolicy {
reason: String,
},
PreconditionNotMet {
precondition: String,
},
IllegalOperation {
reason: String,
},
LockPoisoned,
Internal {
reason: String,
},
Io(Error),
Serialization {
reason: String,
},
Discovery {
reason: String,
},
}
Expand description
This corresponds to “Return codes” in DDS spec 2.2.1.1 Format and Conventions
Deviations from the DDS spec:
OK
is not included. It is not an error. Ok/Error should be distinguished with theResult
type.Error
is too unspecific.AlreadyDeleted
We should use Rust type system to avoid these, so no need for run-time error.Timeout
This is normal operation and should be encoded asOption
orResult
NoData
This should be encoded asOption<SomeData>
, not an error code.
Variants
BadParameter
Fields
reason: String
Illegal parameter value.
Unsupported
Unsupported operation. Can only be returned by operations that are optional.
OutOfResources
Service ran out of the resources needed to complete the operation.
NotEnabled
Operation invoked on an Entity that is not yet enabled.
ImmutablePolicy
Application attempted to modify an immutable QosPolicy.
InconsistentPolicy
Fields
reason: String
Application specified a set of policies that are not consistent with each other.
PreconditionNotMet
Fields
precondition: String
A pre-condition for the operation was not met.
IllegalOperation
Fields
reason: String
An operation was invoked on an inappropriate object or at an inappropriate time (as determined by policies set by the specification or the Service implementation). There is no precondition that could be changed to make the operation succeed.
LockPoisoned
Synchronization with another thread failed because the other thread has exited while holding a lock. Does not exist in the DDS spec.
Internal
Fields
reason: String
Something that should not go wrong went wrong anyway. This is usually a bug in RustDDS
Io(Error)
Tuple Fields
0: Error
Serialization
Fields
reason: String
Discovery
Fields
reason: String
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.