pub enum RecvError {
ContextTerminated,
Interrupted,
Unexpected(Error),
}
Expand description
The type of errors that can occur when receiving a ØMQ message.
The following ØMQ error codes may occur in the underlying ØMQ implementation, but do not need to be handled by users of this crate:
EAGAIN
- this crate will automatically retry if this error code is producedENOTSUP
- unsupported operations are prevented by the design of this crateEINVAL
- multipart messages are not yet supportedENOTSOCK
- the design of this crate prevents sending messages on an invalid socketEFSM
- this applies only to REP/REQ sockets which have their own error type
Variants§
ContextTerminated
The ØMQ context associated with the specified socket was terminated.
Note that this error cannot occur unless you access the raw socket
using as_raw_socket()
.
Corresponds to ØMQ error code ETERM
Interrupted
The operation was interrupted by delivery of a signal before the message was received.
Corresponds to ØMQ error code EINTR
.
TODO verify if this can actually occur, or if it can be handled
internally
Unexpected(Error)
ØMQ produced an error variant that is not documented to occur when receiving a message. This should never happen and should be treated as a bug.
Trait Implementations§
source§impl Error for RecvError
impl Error for RecvError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
impl Copy for RecvError
Auto Trait Implementations§
impl RefUnwindSafe for RecvError
impl Send for RecvError
impl Sync for RecvError
impl Unpin for RecvError
impl UnwindSafe for RecvError
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