pub enum RecordDecodeError {
UnsupportedVersion {
version: ProtocolVersion,
},
UnsupportedType {
record_type: String,
},
Invalid(String),
}Expand description
Failure while decoding an untrusted durable record.
Variants§
UnsupportedVersion
The protocol major is unsupported and takes precedence over record type.
Fields
§
version: ProtocolVersionReceived canonical protocol version.
UnsupportedType
Replay cannot safely understand this required record kind.
Invalid(String)
The known record or envelope is malformed.
Implementations§
Source§impl RecordDecodeError
impl RecordDecodeError
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 RecordDecodeError
impl Debug for RecordDecodeError
Source§impl Display for RecordDecodeError
impl Display for RecordDecodeError
Source§impl Error for RecordDecodeError
impl Error for RecordDecodeError
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 RecordDecodeError
impl RefUnwindSafe for RecordDecodeError
impl Send for RecordDecodeError
impl Sync for RecordDecodeError
impl Unpin for RecordDecodeError
impl UnsafeUnpin for RecordDecodeError
impl UnwindSafe for RecordDecodeError
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