Enum OpDecodeError
#[non_exhaustive]pub enum OpDecodeError {
UnknownOpCode(u8),
InvalidTopic(TopicError),
InvalidSubscriptionId,
PayloadTooLarge(PayloadTooLarge),
Wire(DecodeError),
}Expand description
Why encoded journal-op bytes could not be decoded.
Produced by Op::decode and Ops::new. Failures of the
wire-level primitives the op encoding is built from are wrapped in
Wire; the other variants are journal-format errors that
have no wire-protocol counterpart.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownOpCode(u8)
An unknown operation code was encountered.
InvalidTopic(TopicError)
A topic or topic filter failed validation.
InvalidSubscriptionId
A subscription identifier exceeds the spec-defined maximum
(268_435_455).
PayloadTooLarge(PayloadTooLarge)
A stored payload exceeds Payload::MAX_LEN.
Wire(DecodeError)
A wire-level primitive failed to decode.
Trait Implementations§
§impl Clone for OpDecodeError
impl Clone for OpDecodeError
§fn clone(&self) -> OpDecodeError
fn clone(&self) -> OpDecodeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OpDecodeError
§impl Debug for OpDecodeError
impl Debug for OpDecodeError
§impl Display for OpDecodeError
impl Display for OpDecodeError
impl Eq for OpDecodeError
§impl Error for OpDecodeError
impl Error for OpDecodeError
§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()
§impl From<DecodeError> for OpDecodeError
impl From<DecodeError> for OpDecodeError
§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
§impl From<PayloadTooLarge> for OpDecodeError
impl From<PayloadTooLarge> for OpDecodeError
§fn from(e: PayloadTooLarge) -> Self
fn from(e: PayloadTooLarge) -> Self
Converts to this type from the input type.
§impl PartialEq for OpDecodeError
impl PartialEq for OpDecodeError
impl StructuralPartialEq for OpDecodeError
Auto Trait Implementations§
impl Freeze for OpDecodeError
impl RefUnwindSafe for OpDecodeError
impl Send for OpDecodeError
impl Sync for OpDecodeError
impl Unpin for OpDecodeError
impl UnsafeUnpin for OpDecodeError
impl UnwindSafe for OpDecodeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more