error
Common error types for all protocols
Type Aliases
Section titled “Type Aliases”TransportResult
Section titled “TransportResult”type TransportResult = Result<T, TransportError>;Result types
ProtocolResult
Section titled “ProtocolResult”type ProtocolResult = Result<T, ProtocolError>;TransportError
Section titled “TransportError”Universal Transport Error
Variants
| Variant | Description |
|---|---|
Network(_) | |
Serialization(String) | |
Timeout(String) | |
Http { ... } | |
Configuration(String) | |
Authentication(String) |
Methods
is_retryable
Section titled “is_retryable”fn is_retryable(&self) -> boolCheck if error is retryable
is_auth_error
Section titled “is_auth_error”fn is_auth_error(&self) -> boolCheck if error is due to authentication
ProtocolError
Section titled “ProtocolError”Universal Protocol Error
Variants
| Variant | Description |
|---|---|
UnsupportedProtocol(String) | |
ProtocolNotFound(String) | |
Validation(String) | |
Parsing(String) | |
Transport(TransportError) | |
Serialization(serde_json::Error) | |
Internal(String) |
Methods
internal_error
Section titled “internal_error”fn internal_error(msg: &str) -> SelfCreate internal error
is_retryable
Section titled “is_retryable”fn is_retryable(&self) -> boolCheck if error is retryable