pub struct ParcelEncoder<W: Write> { /* private fields */ }Implementations§
Source§impl<W: Write> ParcelEncoder<W>
impl<W: Write> ParcelEncoder<W>
pub fn new(writer: W) -> Self
Sourcepub fn write_data(&mut self, data: &[u8]) -> Result<(), Error>
pub fn write_data(&mut self, data: &[u8]) -> Result<(), Error>
Write a data packet to the output stream.
§Errors
Returns an error when data packet size exceeds 65531, or when cannot write the data to the writer.
Auto Trait Implementations§
impl<W> Freeze for ParcelEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for ParcelEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for ParcelEncoder<W>where
W: Send,
impl<W> Sync for ParcelEncoder<W>where
W: Sync,
impl<W> Unpin for ParcelEncoder<W>where
W: Unpin,
impl<W> UnsafeUnpin for ParcelEncoder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for ParcelEncoder<W>where
W: UnwindSafe,
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