pub trait Packer {
type Error;
// Required method
fn pack_bytes<B: AsRef<[u8]>>(
&mut self,
bytes: B
) -> Result<(), Self::Error>;
// Provided method
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§
sourcefn written_bytes(&self) -> Option<usize>
fn written_bytes(&self) -> Option<usize>
Returns the exact number of written bytes if possible.