Skip to content

error

Common error types for all protocols

type TransportResult = Result<T, TransportError>;

Result types

type ProtocolResult = Result<T, ProtocolError>;

Universal Transport Error

Variants

VariantDescription
Network(_)
Serialization(String)
Timeout(String)
Http { ... }
Configuration(String)
Authentication(String)

Methods

fn is_retryable(&self) -> bool

Check if error is retryable

fn is_auth_error(&self) -> bool

Check if error is due to authentication

Universal Protocol Error

Variants

VariantDescription
UnsupportedProtocol(String)
ProtocolNotFound(String)
Validation(String)
Parsing(String)
Transport(TransportError)
Serialization(serde_json::Error)
Internal(String)

Methods

fn internal_error(msg: &str) -> Self

Create internal error

fn is_retryable(&self) -> bool

Check if error is retryable