pub enum SerializedPayload {
Scratch {
len: usize,
},
Owned(Vec<u8>),
}Expand description
Location of a payload produced by SerializedReader::recv_into.
Variants§
Scratch
The initialized prefix of the caller-provided scratch buffer.
A custom reader returning this variant must write the prefix during the
same recv_into call and its source must advertise a sufficient
SerializedSource::serializer_scratch_capacity. The pump validates
the length before publishing.
Owned(Vec<u8>)
Compatibility fallback from the existing Vec serializer.
Trait Implementations§
Source§impl Clone for SerializedPayload
impl Clone for SerializedPayload
Source§fn clone(&self) -> SerializedPayload
fn clone(&self) -> SerializedPayload
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 moreSource§impl Debug for SerializedPayload
impl Debug for SerializedPayload
impl Eq for SerializedPayload
Source§impl PartialEq for SerializedPayload
impl PartialEq for SerializedPayload
impl StructuralPartialEq for SerializedPayload
Auto Trait Implementations§
impl Freeze for SerializedPayload
impl RefUnwindSafe for SerializedPayload
impl Send for SerializedPayload
impl Sync for SerializedPayload
impl Unpin for SerializedPayload
impl UnsafeUnpin for SerializedPayload
impl UnwindSafe for SerializedPayload
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