pub enum SendError {
ContextTerminated,
HostUnreachable,
InvalidMessage,
Interrupted,
Unexpected(Error),
}Expand description
The type of errors that can occur when sending 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
HostUnreachable
The host is unreachable and the message cannot be routed.
Corresponds to ØMQ error code EHOSTUNREACH.
InvalidMessage
The message is invalid.
Corresponds to ØMQ error code EFAULT.
Interrupted
The operation was interrupted by delivery of a signal before the message was sent.
Corresponds to ØMQ error code EINTR.
TODO verify if this can actually occur, or if it can be handled
internally with a retry
Unexpected(Error)
ØMQ produced an error variant that is not documented to occur when sending a message. This should never happen and should be treated as a bug.