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 the Result 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 as Option or Result
  • NoData This should be encoded as Option<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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.