pub struct Writer { /* private fields */ }Expand description
Big-endian byte writer.
Implementations§
Source§impl Writer
impl Writer
pub fn with_capacity(capacity: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn bytes(&mut self, bytes: &[u8])
pub fn u8(&mut self, v: u8)
pub fn u16(&mut self, v: u16)
pub fn u32(&mut self, v: u32)
pub fn u64(&mut self, v: u64)
pub fn i64(&mut self, v: i64)
pub fn zeros(&mut self, n: usize)
pub fn str16(&mut self, s: &str) -> Result<()>
Sourcepub fn record(&mut self, record: &[u8]) -> Result<()>
pub fn record(&mut self, record: &[u8]) -> Result<()>
Writes a u16 length and the record, at most one sealed record.
pub fn into_vec(self) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Forget for Writer
impl Freeze for Writer
impl Move 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