pub struct Writer { /* private fields */ }Expand description
Builds a container: the owner area, then sections in order.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn owner(&mut self, bytes: &[u8]) -> &mut Self
pub fn owner(&mut self, bytes: &[u8]) -> &mut Self
The format’s own header fields (up to OWNER_LEN bytes, rest zero).
Sourcepub fn section(&mut self, kind: u16, bytes: Vec<u8>) -> &mut Self
pub fn section(&mut self, kind: u16, bytes: Vec<u8>) -> &mut Self
Append one section (empty sections are omitted: absent reads as empty).
Sourcepub fn section_flagged(
&mut self,
kind: u16,
flags: u16,
bytes: Vec<u8>,
) -> &mut Self
pub fn section_flagged( &mut self, kind: u16, flags: u16, bytes: Vec<u8>, ) -> &mut Self
Append one section with per-section flags (the format’s own meaning,
e.g. “compressed”), read back by Dir::section_flags.
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