Enum rustdds::dds::error::Error[][src]

pub enum Error {
    BadParameter {
        reason: String,
    },
    Unsupported,
    OutOfResources,
    NotEnabled,
    ImmutablePolicy,
    InconsistentPolicy {
        reason: String,
    },
    PreconditionNotMet {
        precondition: String,
    },
    IllegalOperation {
        reason: String,
    },
    LockPoisoned,
    Internal {
        reason: String,
    },
    Io {
        inner: Error,
    },
    Serialization {
        reason: String,
    },
    Discovery {
        reason: String,
    },
}

This roughly 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

Illegal parameter value.

Fields of BadParameter

reason: String
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

Application specified a set of policies that are not consistent with each other.

Fields of InconsistentPolicy

reason: String
PreconditionNotMet

A pre-condition for the operation was not met.

Fields of PreconditionNotMet

precondition: String
IllegalOperation

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.

Fields of IllegalOperation

reason: String
LockPoisoned

Synchronization with another thread failed because the other thread has exited while holding a lock. Does not exist in the DDS spec.

Internal

Something that should not go wrong went wrong anyway. This is usually a bug in RustDDS

Fields of Internal

reason: String
Io

Fields of Io

inner: Error
Serialization

Fields of Serialization

reason: String
Discovery

Fields of Discovery

reason: String

Implementations

impl Error[src]

pub fn bad_parameter<T>(reason: &str) -> Result<T>[src]

pub fn precondition_not_met<T>(precondition: &str) -> Result<T>[src]

Trait Implementations

impl Debug for Error[src]

impl From<Error> for Error[src]

impl<T> From<PoisonError<T>> for Error[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,