Enum PartialError
pub enum PartialError {
InsufficientData {
expected: usize,
received: usize,
},
InvalidFormat,
WrongGroup {
received: Vec<u8>,
},
DuplicateData(Vec<u8>),
OutOfRange,
AlreadyComplete,
ValidationFailed,
PartialNotSupportedForTopic,
}Available on crate features
gossipsub and partial-messages only.Expand description
Errors that can occur during partial message processing.
Variants§
InsufficientData
The received data is too short to contain required headers/metadata.
Fields
InvalidFormat
The data format is invalid or corrupted.
WrongGroup
The partial data doesn’t belong to this message group.
DuplicateData(Vec<u8>)
The partial data is a duplicate of already received data.
OutOfRange
The partial data is out of the expected range or sequence.
AlreadyComplete
The message is already complete and cannot accept more data.
ValidationFailed
Application-specific validation failed.
PartialNotSupportedForTopic
Local node does not allow partial messages for this topic. Should send full messages instead or activate partial messages for this topic.
Trait Implementations§
§impl Clone for PartialError
impl Clone for PartialError
§fn clone(&self) -> PartialError
fn clone(&self) -> PartialError
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 more§impl Debug for PartialError
impl Debug for PartialError
§impl Display for PartialError
impl Display for PartialError
impl Eq for PartialError
§impl Error for PartialError
impl Error for PartialError
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()
§impl PartialEq for PartialError
impl PartialEq for PartialError
impl StructuralPartialEq for PartialError
Auto Trait Implementations§
impl Forget for PartialError
impl Freeze for PartialError
impl Move for PartialError
impl RefUnwindSafe for PartialError
impl Send for PartialError
impl Sync for PartialError
impl Unpin for PartialError
impl UnsafeUnpin for PartialError
impl UnwindSafe for PartialError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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