pub enum CommandDecodeError {
UnsupportedVersion {
version: ProtocolVersion,
},
UnsupportedType {
command_type: String,
},
Invalid(String),
}Expand description
Failure while decoding an untrusted command envelope.
Variants§
UnsupportedVersion
The protocol major is unsupported and takes precedence over command type.
Fields
§
version: ProtocolVersionReceived canonical protocol version.
UnsupportedType
The discriminator is canonical but unsupported by this host.
Invalid(String)
The command envelope or known payload is malformed.
Implementations§
Source§impl CommandDecodeError
impl CommandDecodeError
Sourcepub fn into_protocol_error(self, correlation_id: CorrelationId) -> ProtocolError
pub fn into_protocol_error(self, correlation_id: CorrelationId) -> ProtocolError
Converts a decode failure to a safe protocol error.
Trait Implementations§
Source§impl Debug for CommandDecodeError
impl Debug for CommandDecodeError
Source§impl Display for CommandDecodeError
impl Display for CommandDecodeError
Source§impl Error for CommandDecodeError
impl Error for CommandDecodeError
1.30.0 · 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 Freeze for CommandDecodeError
impl RefUnwindSafe for CommandDecodeError
impl Send for CommandDecodeError
impl Sync for CommandDecodeError
impl Unpin for CommandDecodeError
impl UnsafeUnpin for CommandDecodeError
impl UnwindSafe for CommandDecodeError
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