Enum PayloadEncodeError
#[non_exhaustive]pub enum PayloadEncodeError {
TooLarge {
limit: u64,
},
LengthOverLimit {
length: u64,
limit: u32,
},
TooDeep,
NonFinite,
}Expand description
Why a value was not encoded. Nothing is sent.
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.
TooLarge
The encoded body would pass the writer’s byte limit.
LengthOverLimit
A string, byte array or list longer than its bound, so the peer would refuse it.
TooDeep
Values nested deeper than PAYLOAD_MAX_DEPTH.
NonFinite
A number that must be finite is NaN or infinite.
Trait Implementations§
§impl Clone for PayloadEncodeError
impl Clone for PayloadEncodeError
§fn clone(&self) -> PayloadEncodeError
fn clone(&self) -> PayloadEncodeError
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 PayloadEncodeError
§impl Debug for PayloadEncodeError
impl Debug for PayloadEncodeError
impl Eq for PayloadEncodeError
§impl Hash for PayloadEncodeError
impl Hash for PayloadEncodeError
§impl PartialEq for PayloadEncodeError
impl PartialEq for PayloadEncodeError
impl StructuralPartialEq for PayloadEncodeError
Auto Trait Implementations§
impl Freeze for PayloadEncodeError
impl RefUnwindSafe for PayloadEncodeError
impl Send for PayloadEncodeError
impl Sync for PayloadEncodeError
impl Unpin for PayloadEncodeError
impl UnsafeUnpin for PayloadEncodeError
impl UnwindSafe for PayloadEncodeError
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