pub trait Packer {
type Error;
fn pack_bytes<B: AsRef<[u8]>>(
&mut self,
bytes: B
) -> Result<(), Self::Error>;
fn written_bytes(&self) -> Option<usize> { ... }
}
Expand description
A type that can pack any value that implements Packable
.
Required Associated Types
Required Methods
Provided Methods
fn written_bytes(&self) -> Option<usize>
fn written_bytes(&self) -> Option<usize>
Returns the exact number of written bytes if possible.