pub enum Error {
Show 22 variants
Transport {
source: Error,
context: String,
},
MessageSerialization {
source: EncodeError,
type_name: &'static str,
},
MessageDeserialization {
source: DecodeError,
type_name: &'static str,
},
Serialization(String),
Encoding(EncodeError),
Decoding(DecodeError),
NodeAlreadyExists {
name: String,
},
TopicAlreadyExists {
topic: String,
node: String,
},
ServiceAlreadyExists {
service: String,
node: String,
},
ServiceCallTimeout {
service: String,
timeout_ms: u64,
},
ServiceCallFailed {
service: String,
reason: String,
},
Parameter {
name: String,
reason: String,
},
Node {
node: String,
reason: String,
},
Publisher {
topic: String,
reason: String,
},
Subscriber {
topic: String,
reason: String,
},
Service {
service: String,
reason: String,
},
Client {
service: String,
reason: String,
},
NotSupported {
operation: String,
reason: String,
},
NotImplemented {
operation: String,
reason: String,
},
Configuration {
reason: String,
},
Network {
reason: String,
},
Other {
reason: String,
},
}Expand description
Error type for Zenobuf operations
Variants§
Transport
Error from the Zenoh transport layer
MessageSerialization
Error during message serialization
MessageDeserialization
Error during message deserialization
Serialization(String)
Error during serialization or deserialization (legacy)
Encoding(EncodeError)
Error during message encoding (legacy)
Decoding(DecodeError)
Error during message decoding (legacy)
NodeAlreadyExists
Error when a node with the same name already exists
TopicAlreadyExists
Error when a topic with the same name already exists
ServiceAlreadyExists
Error when a service with the same name already exists
ServiceCallTimeout
Error when a service call times out
ServiceCallFailed
Error when a service call fails
Parameter
Error when a parameter operation fails
Node
Error when a node operation fails
Publisher
Error when a publisher operation fails
Subscriber
Error when a subscriber operation fails
Service
Error when a service operation fails
Client
Error when a client operation fails
NotSupported
Error when an operation is not supported
NotImplemented
Error when an operation is not implemented
Configuration
Configuration error
Network
Network error
Other
Other errors
Implementations§
Source§impl Error
impl Error
Sourcepub fn transport(source: Error, context: impl Into<String>) -> Self
pub fn transport(source: Error, context: impl Into<String>) -> Self
Create a transport error with context
Sourcepub fn message_serialization(
source: EncodeError,
type_name: &'static str,
) -> Self
pub fn message_serialization( source: EncodeError, type_name: &'static str, ) -> Self
Create a message serialization error
Sourcepub fn message_deserialization(
source: DecodeError,
type_name: &'static str,
) -> Self
pub fn message_deserialization( source: DecodeError, type_name: &'static str, ) -> Self
Create a message deserialization error
Sourcepub fn node_already_exists(name: impl Into<String>) -> Self
pub fn node_already_exists(name: impl Into<String>) -> Self
Create a node already exists error
Sourcepub fn topic_already_exists(
topic: impl Into<String>,
node: impl Into<String>,
) -> Self
pub fn topic_already_exists( topic: impl Into<String>, node: impl Into<String>, ) -> Self
Create a topic already exists error
Sourcepub fn service_already_exists(
service: impl Into<String>,
node: impl Into<String>,
) -> Self
pub fn service_already_exists( service: impl Into<String>, node: impl Into<String>, ) -> Self
Create a service already exists error
Sourcepub fn service_call_timeout(service: impl Into<String>, timeout_ms: u64) -> Self
pub fn service_call_timeout(service: impl Into<String>, timeout_ms: u64) -> Self
Create a service call timeout error
Sourcepub fn service_call_failed(
service: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn service_call_failed( service: impl Into<String>, reason: impl Into<String>, ) -> Self
Create a service call failed error
Sourcepub fn parameter(name: impl Into<String>, reason: impl Into<String>) -> Self
pub fn parameter(name: impl Into<String>, reason: impl Into<String>) -> Self
Create a parameter error
Sourcepub fn publisher(topic: impl Into<String>, reason: impl Into<String>) -> Self
pub fn publisher(topic: impl Into<String>, reason: impl Into<String>) -> Self
Create a publisher error
Sourcepub fn subscriber(topic: impl Into<String>, reason: impl Into<String>) -> Self
pub fn subscriber(topic: impl Into<String>, reason: impl Into<String>) -> Self
Create a subscriber error
Sourcepub fn service(service: impl Into<String>, reason: impl Into<String>) -> Self
pub fn service(service: impl Into<String>, reason: impl Into<String>) -> Self
Create a service error
Sourcepub fn client(service: impl Into<String>, reason: impl Into<String>) -> Self
pub fn client(service: impl Into<String>, reason: impl Into<String>) -> Self
Create a client error
Sourcepub fn configuration(reason: impl Into<String>) -> Self
pub fn configuration(reason: impl Into<String>) -> Self
Create a configuration error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for Error
impl From<EncodeError> for Error
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more