#[non_exhaustive]pub enum SdkError {
}Expand description
Unified SDK error.
Marked #[non_exhaustive] so adding a new variant is a minor-version
change — external match statements must include a wildcard arm.
The most recent variant additions (Sampled, Unrouted) tightened
From<IngestionError> so structured backpressure / sampling /
no-route signals stop being funnelled into a stringly-typed
Ingestion(String). Callers that previously matched on the
string content of Ingestion need to be updated to match the
new variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Shutdown
Ingestion(String)
Generic ingestion failure that doesn’t map to a more specific variant.
Pre-fix, every IngestionError was funnelled here
— Backpressure, Sampled, Unrouted, and shutdown all
became Ingestion("…") and callers had to string-match to
pick a remediation. Today’s From<IngestionError> impl
routes the structured variants below; this String variant
stays as a fallback for any future IngestionError
addition and for callers that already pattern-match on it.
Sampled
Event was deliberately dropped by a sampling / decimation policy. Retrying is pointless — the producer should accept the drop or change the sampling rate.
Unrouted
No routable shard for the event. Typically a topology-
transient state (a concurrent scale-down removed the
hashed shard id, or the shard is still provisioning).
Retry once topology stabilizes; back-off-and-retry on
Backpressure semantics is the wrong remediation.
Poll(String)
Adapter(String)
Serialization(Error)
Config(String)
NoMesh
Backpressure
Stream’s per-stream in-flight window is full. The caller’s events
were NOT sent — daemons decide whether to drop, retry, or buffer
at the app layer. See Mesh::send_with_retry / send_blocking
for the two built-in policies.
NotConnected
Stream’s peer session is gone (peer disconnected, never connected, or the stream was closed).
ChannelRejected(Option<AckReason>)
A publisher’s Ack rejected a Subscribe / Unsubscribe
request. None means the rejection arrived without a
structured reason. Gated behind net because
AckReason lives in the network-transport surface;
non-net SDK builds (e.g. redis-only consumer helpers)
don’t compile this variant.
Traversal
NAT-traversal failure — a reflex probe, hole-punch, or
port-mapping path couldn’t complete. Always represents a
missed optimization, never a connectivity failure:
every NATed peer remains reachable through the routed-
handshake path. kind is a stable discriminator
matching the nat-traversal crate’s error vocabulary
(reflex-timeout / peer-not-reachable / transport /
rendezvous-no-relay / rendezvous-rejected /
punch-failed / port-map-unavailable / unsupported).
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
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<AdapterError> for SdkError
impl From<AdapterError> for SdkError
Source§fn from(e: AdapterError) -> Self
fn from(e: AdapterError) -> Self
Source§impl From<ConsumerError> for SdkError
impl From<ConsumerError> for SdkError
Source§fn from(e: ConsumerError) -> Self
fn from(e: ConsumerError) -> Self
Source§impl From<IngestionError> for SdkError
impl From<IngestionError> for SdkError
Source§fn from(e: IngestionError) -> Self
fn from(e: IngestionError) -> Self
Source§impl From<StreamError> for SdkError
Available on crate feature net only.
impl From<StreamError> for SdkError
net only.Source§fn from(e: StreamError) -> Self
fn from(e: StreamError) -> Self
Source§impl From<TraversalError> for SdkError
Available on crate feature nat-traversal only.
impl From<TraversalError> for SdkError
nat-traversal only.