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
impl Clone for TransportError
Source§fn clone(&self) -> TransportError
fn clone(&self) -> TransportError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more