#[non_exhaustive]pub enum ZmqError {
Endpoint {
endpoint: String,
source: Box<dyn StdError + Send + Sync>,
},
Send {
name: String,
reason: String,
},
Receive(String),
Wire(String),
RequestTimeout,
NotConnected,
Invalid(String),
}Expand description
Errors returned by the ZeroMQ transport.
One enum for the whole crate, variants by source, per the RustStream broker conventions.
The wrapped sources are boxed std errors so the public API does not leak the
implementation’s error types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Endpoint
Binding or connecting a socket failed.
Fields
Send
Sending failed (no connected peer after the retry window, or the transport failed).
Receive(String)
Receiving failed.
Wire(String)
A peer sent frames that do not follow the documented wire layout.
RequestTimeout
A request did not produce a reply within the caller’s timeout.
NotConnected
The handle is used before connect filled the shared state, or after shutdown.
Invalid(String)
An endpoint or descriptor is invalid.
Trait Implementations§
Source§impl Error for ZmqError
impl Error for ZmqError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ZmqError
impl !UnwindSafe for ZmqError
impl Freeze for ZmqError
impl Send for ZmqError
impl Sync for ZmqError
impl Unpin for ZmqError
impl UnsafeUnpin for ZmqError
Blanket Implementations§
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
Mutably borrows from an owned value. Read more