Expand description
Wrapper around an output buffer.
C is usually either [u8] or Vec<u8>.
Bytes will be written starting at dst[pos].
pos will be updated after writing.
Invariant
pos <= dst.capacity()
Fields§
§dst: &'a mut CImplementations§
source§impl<'a, C> OutBuffer<'a, C>where
C: WriteBuf + ?Sized,
impl<'a, C> OutBuffer<'a, C>where
C: WriteBuf + ?Sized,
sourcepub fn around(dst: &'a mut C) -> OutBuffer<'a, C>
pub fn around(dst: &'a mut C) -> OutBuffer<'a, C>
Returns a new OutBuffer around the given slice.
Starts with pos = 0.
sourcepub fn around_pos(dst: &'a mut C, pos: usize) -> OutBuffer<'a, C>
pub fn around_pos(dst: &'a mut C, pos: usize) -> OutBuffer<'a, C>
Returns a new OutBuffer around the given slice, starting at the given position.
Panics
If pos >= dst.capacity().