Skip to main content

TransportError

Enum TransportError 

Source
pub enum TransportError {
Show 32 variants ConnectionFailed, Disconnected, PublisherCreationFailed, SubscriberCreationFailed, ServiceServerCreationFailed, ServiceClientCreationFailed, PublishFailed, ServiceRequestFailed, ServiceReplyFailed, SerializationError, DeserializationError, BufferTooSmall, MessageTooLarge, Timeout, InvalidConfig, WouldBlock, TooLarge, TaskStartFailed, PollFailed, KeepaliveFailed, JoinFailed, InvalidArgument, Unsupported, BadAlloc, IncompatibleQos, TopicNameInvalid, NodeNameNonExistent, LoanNotSupported, NoData, IncompatibleAbi, Backend(&'static str), BackendDynamic(String),
}
Expand description

Transport error types.

No longer Copy — the Backend / BackendDynamic variants carry a string diagnostic, which can’t be Copy. Rust callers that used to copy a TransportError value repeatedly now need .clone() or ref in match arms. C/C++ callers are unaffected — both map TransportError to integer codes (nros_ret_t / ErrorCode) before crossing the FFI boundary.

Variants§

§

ConnectionFailed

Failed to connect to transport

§

Disconnected

Connection was closed

§

PublisherCreationFailed

Failed to create publisher

§

SubscriberCreationFailed

Failed to create subscriber

§

ServiceServerCreationFailed

Failed to create service server

§

ServiceClientCreationFailed

Failed to create service client

§

PublishFailed

Failed to publish message

§

ServiceRequestFailed

Failed to send service request

§

ServiceReplyFailed

Failed to send service reply

§

SerializationError

Serialization error

§

DeserializationError

Deserialization error

§

BufferTooSmall

Buffer too small

§

MessageTooLarge

Incoming message exceeded the static buffer capacity

§

Timeout

Timeout waiting for message

§

InvalidConfig

Invalid configuration

§

WouldBlock

Resource (slot, buffer, queue) momentarily unavailable. Retry. Phase 99: returned by try_loan when arena slots are full and by try_borrow when no message is ready (alternative to Ok(None) for backends that prefer the error variant).

§

TooLarge

Requested allocation exceeds backend capacity. Phase 99: try_loan(len) returns this when len > arena slot size.

§

TaskStartFailed

Failed to start background tasks

§

PollFailed

Failed to poll for incoming messages

§

KeepaliveFailed

Failed to send keepalive

§

JoinFailed

Failed to send join message

§

InvalidArgument

Caller supplied a NULL pointer, an out-of-range value, or an inconsistent argument combination. Phase 102.1.

§

Unsupported

The backend does not implement this operation. Optional callbacks return this; the runtime then falls back to a default path. Phase 102.1.

§

BadAlloc

Memory allocation failed. Returned by backends on std / alloc-equipped platforms when heap allocation fails. Bare-metal backends generally do not produce this — they preallocate at session-open time. Phase 102.1.

§

IncompatibleQos

Publisher and subscriber QoS profiles do not match in a way the backend cannot reconcile. Phase 102.1.

§

TopicNameInvalid

Topic, service, or action name failed validation. Phase 102.1.

§

NodeNameNonExistent

A request referenced a node that does not exist in this session. Phase 102.1.

§

LoanNotSupported

The backend does not support loaned messages on this entity, or the loan slot is currently in use. Phase 102.1.

§

NoData

No data was available on a non-blocking receive. Distinct from Timeout: fires immediately, not after a bounded wait. Phase 102.1.

§

IncompatibleAbi

Phase 115.A.2 — caller passed a versioned vtable struct (e.g. NrosTransportOps) with an abi_version the runtime doesn’t know. Maps to NROS_RMW_RET_INCOMPATIBLE_ABI at the C boundary.

§

Backend(&'static str)

Backend-specific error with a 'static diagnostic string.

Useful for zenoh-pico / XRCE-DDS return codes that map to a fixed set of known messages. no_std-compatible.

§

BackendDynamic(String)

Backend-specific error with an owned diagnostic string.

Available only with the alloc feature. Use this when the diagnostic is formatted at runtime (e.g. from a C error code plus a socket address).

Trait Implementations§

Source§

impl Clone for TransportError

Source§

fn clone(&self) -> TransportError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TransportError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<TransportError> for LoanError

Source§

fn from(e: TransportError) -> LoanError

Converts to this type from the input type.
Source§

impl From<TransportError> for NodeError

Source§

fn from(err: TransportError) -> NodeError

Converts to this type from the input type.
Source§

impl PartialEq for TransportError

Source§

fn eq(&self, other: &TransportError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for TransportError

Source§

impl StructuralPartialEq for TransportError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.