pub enum Error {
Show 14 variants
Transport {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
ServiceNotFound {
name: String,
},
MethodNotFound {
service: String,
method: String,
},
Serialization {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Connection {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Timeout {
operation: String,
duration_ms: u64,
},
Runtime {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Configuration {
message: String,
field: Option<String>,
},
Io {
message: String,
source: Error,
},
ServiceLifecycle {
message: String,
service: String,
state: String,
},
Protocol {
message: String,
expected: Option<String>,
received: Option<String>,
},
InvalidTopicPattern {
pattern: String,
},
SubscriptionError {
message: String,
topic: Option<String>,
},
InvalidRequest {
message: String,
context: Option<String>,
},
}Expand description
Main error type for hsipc operations
Variants§
Transport
Transport layer errors
ServiceNotFound
Service registration and discovery errors
MethodNotFound
Method invocation errors
Serialization
Serialization and deserialization errors
Connection
Connection management errors
Timeout
Timeout errors
Runtime
Runtime errors
Configuration
Configuration errors
Io
IO errors
ServiceLifecycle
Service lifecycle errors
Protocol
Protocol errors
InvalidTopicPattern
Topic pattern validation errors
SubscriptionError
Subscription management errors
InvalidRequest
Request validation errors
Implementations§
Source§impl Error
impl Error
Sourcepub fn transport<E>(message: impl Into<String>, source: E) -> Self
pub fn transport<E>(message: impl Into<String>, source: E) -> Self
Create a transport error with source
Sourcepub fn transport_msg(message: impl Into<String>) -> Self
pub fn transport_msg(message: impl Into<String>) -> Self
Create a transport error without source
Sourcepub fn service_not_found(name: impl Into<String>) -> Self
pub fn service_not_found(name: impl Into<String>) -> Self
Create a service not found error
Sourcepub fn method_not_found(
service: impl Into<String>,
method: impl Into<String>,
) -> Self
pub fn method_not_found( service: impl Into<String>, method: impl Into<String>, ) -> Self
Create a method not found error
Sourcepub fn serialization<E>(message: impl Into<String>, source: E) -> Self
pub fn serialization<E>(message: impl Into<String>, source: E) -> Self
Create a serialization error with source
Sourcepub fn serialization_msg(message: impl Into<String>) -> Self
pub fn serialization_msg(message: impl Into<String>) -> Self
Create a serialization error without source
Sourcepub fn connection<E>(message: impl Into<String>, source: E) -> Self
pub fn connection<E>(message: impl Into<String>, source: E) -> Self
Create a connection error with source
Sourcepub fn connection_msg(message: impl Into<String>) -> Self
pub fn connection_msg(message: impl Into<String>) -> Self
Create a connection error without source
Sourcepub fn runtime<E>(message: impl Into<String>, source: E) -> Self
pub fn runtime<E>(message: impl Into<String>, source: E) -> Self
Create a runtime error with source
Sourcepub fn runtime_msg(message: impl Into<String>) -> Self
pub fn runtime_msg(message: impl Into<String>) -> Self
Create a runtime error without source
Sourcepub fn configuration(message: impl Into<String>, field: Option<String>) -> Self
pub fn configuration(message: impl Into<String>, field: Option<String>) -> Self
Create a configuration error
Sourcepub fn service_lifecycle(
message: impl Into<String>,
service: impl Into<String>,
state: impl Into<String>,
) -> Self
pub fn service_lifecycle( message: impl Into<String>, service: impl Into<String>, state: impl Into<String>, ) -> Self
Create a service lifecycle error
Sourcepub fn protocol(
message: impl Into<String>,
expected: Option<String>,
received: Option<String>,
) -> Self
pub fn protocol( message: impl Into<String>, expected: Option<String>, received: Option<String>, ) -> Self
Create a protocol error
Sourcepub fn invalid_topic_pattern(pattern: impl Into<String>) -> Self
pub fn invalid_topic_pattern(pattern: impl Into<String>) -> Self
Create an invalid topic pattern error
Sourcepub fn subscription_error(
message: impl Into<String>,
topic: Option<String>,
) -> Self
pub fn subscription_error( message: impl Into<String>, topic: Option<String>, ) -> Self
Create a subscription error
Sourcepub fn invalid_request(
message: impl Into<String>,
context: Option<String>,
) -> Self
pub fn invalid_request( message: impl Into<String>, context: Option<String>, ) -> Self
Create an invalid request error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if error is retryable