Struct packable::packer::CounterPacker
source · [−]pub struct CounterPacker<P: Packer> { /* private fields */ }
Expand description
A Packer
able to keep count of the number of written bytes.
Implementations
sourceimpl<P: Packer> CounterPacker<P>
impl<P: Packer> CounterPacker<P>
sourcepub fn new(packer: P) -> Self
pub fn new(packer: P) -> Self
Creates a new CounterPacker
.
sourcepub fn into_inner(self) -> P
pub fn into_inner(self) -> P
Consumes the value to return the inner Packer
.
Trait Implementations
Auto Trait Implementations
impl<P> RefUnwindSafe for CounterPacker<P> where
P: RefUnwindSafe,
impl<P> Send for CounterPacker<P> where
P: Send,
impl<P> Sync for CounterPacker<P> where
P: Sync,
impl<P> Unpin for CounterPacker<P> where
P: Unpin,
impl<P> UnwindSafe for CounterPacker<P> where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more