Enum rustdds::dds::result::WriteError
source · pub enum WriteError<D> {
Serialization {
reason: String,
data: D,
},
Poisoned {
reason: String,
data: D,
},
Io(Error),
WouldBlock {
data: D,
},
Internal {
reason: String,
},
}
Expand description
Error type for DDS “Write” operations.
Note: This type contains payload data type D
. This means that WriteError
implements Debug
only if D
does.
Variants§
Serialization
Data serializer (SerializerAdapter
) reported an error when called.
Reason field gives more details on what went wrong.
Poisoned
Communication or synchronization with RTPS processing thread or Discovery thread fails. This is most likely because either thread has panicked or gotten stuck somewhere, neither of which is supposed to happen. This is typically not recoverable, except by starting a new DomainParticipant.
Io(Error)
a std::io::Error
occurred within RustDDS.
WouldBlock
The operation would block, or blocked until specified timeout expired.
Fields
data: D
Internal
Something that should not go wrong went wrong anyway. This is usually a bug in RustDDS
Implementations§
source§impl<D> WriteError<D>
impl<D> WriteError<D>
sourcepub fn forget_data(self) -> WriteError<()>
pub fn forget_data(self) -> WriteError<()>
Forgets the data of WriteError, which can be useful in cases where it is not needed.