pub struct Writer { /* private fields */ }Expand description
Writing cursor building an outgoing buffer.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn new(base: usize) -> Self
pub fn new(base: usize) -> Self
New writer whose first byte will sit at absolute frame offset base
(needed for Unicode parity padding decisions).
Sourcepub fn into_inner(self) -> Vec<u8> ⓘ
pub fn into_inner(self) -> Vec<u8> ⓘ
Borrow the accumulated bytes.
Sourcepub fn pad_to_parity(&mut self)
pub fn pad_to_parity(&mut self)
Insert a pad byte so the current position becomes even relative to
Self::base (Unicode alignment requirement).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl UnwindSafe for Writer
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