pub enum EnvelopeError {
Compatibility(CompatibilityError),
NotAnObject,
MissingVersion,
InvalidVersion(String),
MissingPayload,
Json(Error),
Payload(Error),
}Expand description
Errors from envelope JSON decode, including compatibility failures.
Variants§
Compatibility(CompatibilityError)
Version is outside the supported window.
NotAnObject
Top-level JSON was not an object.
MissingVersion
Envelope object lacked wire_version.
InvalidVersion(String)
wire_version was present but not a u32.
MissingPayload
Envelope object lacked payload after the version check passed.
Json(Error)
Failed to parse or serialize envelope JSON.
Payload(Error)
Version was supported, but the payload did not decode as T.
Trait Implementations§
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
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()
Source§impl From<CompatibilityError> for EnvelopeError
impl From<CompatibilityError> for EnvelopeError
Source§fn from(source: CompatibilityError) -> Self
fn from(source: CompatibilityError) -> Self
Converts to this type from the input type.
Source§impl From<EnvelopeError> for ZmqMessageError
impl From<EnvelopeError> for ZmqMessageError
Source§fn from(source: EnvelopeError) -> Self
fn from(source: EnvelopeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for EnvelopeError
impl !UnwindSafe for EnvelopeError
impl Freeze for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnsafeUnpin for EnvelopeError
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