pub enum SdkError {
ReadInterrupted,
Connection {
description: String,
},
Protocol {
description: String,
},
Serialization {
description: String,
},
TypeValidation {
description: String,
},
Backpressure {
reason: String,
},
PublishUnresolved {
description: String,
},
Conversation {
conversation_id: String,
description: String,
},
Store {
description: String,
},
NotConnected {
operation: String,
},
Unwired {
surface: String,
seam: String,
alternative: String,
},
}Expand description
Error taxonomy returned by the Rust SDK API surface.
The SDK keeps application code independent from transport, protocol framing, and core implementation error types. Concrete embedded and remote adapters map their internal failures into these variants.
Clone is derived so a failure can be both RETAINED and RETURNED at the same
seam. A store failure that bricks a participant handle is exactly that shape:
the error travels to the caller of the failing operation, while a copy stays
behind as the reason every later call reports
RemoteParticipantError::StateUnavailable. Without it the cause is
observable exactly once and only by whoever happened to make the failing
call.
Variants§
ReadInterrupted
A ReadWake ended a budgeted participant read before a frame arrived;
the transport remains usable. See ReadWake for which reads it reaches.
Connection
Establishing, keeping, or recovering a client connection failed.
Protocol
Encoding, decoding, or interpreting SDK-internal protocol state failed.
Serialization
Serialising an outbound value or deserialising an inbound value failed.
TypeValidation
A typed message did not satisfy the schema declared for its channel.
Backpressure
A publish operation encountered application-visible backpressure.
PublishUnresolved
A publish whose outcome the server could not resolve: it cannot tell whether the message was stored.
Decoded from the reply’s reason code alone, never from its text. It is neither a rejection nor backpressure: the publish may have been stored, so the safe response is a retry carrying the SAME idempotency key, which answers the original outcome if the row committed.
Conversation
A conversation operation failed.
Fields
Store
Persisted subscription or recovery state could not be read or written.
NotConnected
A remote operation ran against a configuration whose transport was never connected, so nothing it did could have reached any wire.
RemoteConfig::new installs the unconnected in-process transport. Call
RemoteConfig::connect_tcp, RemoteConfig::connect_tcp_with_auth,
RemoteConfig::connect_websocket,
RemoteConfig::connect_websocket_with_auth, or (with the embedded
feature) RemoteConfig::connect_loopback before publishing,
subscribing, conversing, or resuming. The SDK refuses here rather than
encoding a frame it discards and reporting the success that would imply.
Unwired
An SDK surface exists but has no machinery behind it, so it refused rather than reporting a success it cannot deliver.
This is the SDK being loud about an absent feature. seam records where
the gap is written down (a ledger row, or that nothing records it) and
alternative names the surface that does work today.
Trait Implementations§
impl Eq for SdkError
Source§impl Error for SdkError
impl Error for SdkError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<MailboxOverflow> for SdkError
impl From<MailboxOverflow> for SdkError
Source§fn from(overflow: MailboxOverflow) -> Self
fn from(overflow: MailboxOverflow) -> Self
impl StructuralPartialEq for SdkError
Auto Trait Implementations§
impl Freeze for SdkError
impl RefUnwindSafe for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
impl UnwindSafe for SdkError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.