pub struct SliceSerializer<'data> { /* private fields */ }Expand description
Serialize a Packet to a mutable slice
Implementations§
Trait Implementations§
Source§impl Serializer for SliceSerializer<'_>
impl Serializer for SliceSerializer<'_>
type Marker = (usize, usize)
fn context(&self) -> ProtocolContext
fn direction(&self) -> CommandDirection
fn write_bytes(&mut self, fragment: &[u8]) -> SerializeResult
fn write_marker( &mut self, length: usize, ) -> Result<Self::Marker, SerializeError>
fn set_marker( &mut self, marker: Self::Marker, fragment: &[u8], ) -> SerializeResult
fn marker_distance(&self, marker: &Self::Marker) -> usize
fn write<F>(&mut self, length: usize, write_slice_fn: F) -> SerializeResult
Auto Trait Implementations§
impl<'data> Freeze for SliceSerializer<'data>
impl<'data> RefUnwindSafe for SliceSerializer<'data>
impl<'data> Send for SliceSerializer<'data>
impl<'data> Sync for SliceSerializer<'data>
impl<'data> Unpin for SliceSerializer<'data>
impl<'data> !UnwindSafe for SliceSerializer<'data>
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