pub struct OleanWriter { /* private fields */ }Expand description
Streaming binary writer for the OleanC format.
Implementations§
Source§impl OleanWriter
impl OleanWriter
Sourcepub fn write_header(&mut self, decl_count: u32) -> &mut Self
pub fn write_header(&mut self, decl_count: u32) -> &mut Self
Write the OleanC file header.
The metadata section offset is set to HEADER_SIZE (immediately after the header)
when no additional body is present; callers may update it afterwards.
Sourcepub fn write_string(&mut self, s: &str) -> &mut Self
pub fn write_string(&mut self, s: &str) -> &mut Self
Write a length-prefixed UTF-8 string (u32 length + bytes).
Sourcepub fn write_bool(&mut self, v: bool) -> &mut Self
pub fn write_bool(&mut self, v: bool) -> &mut Self
Write a bool as a single byte (0 or 1).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OleanWriter
impl RefUnwindSafe for OleanWriter
impl Send for OleanWriter
impl Sync for OleanWriter
impl Unpin for OleanWriter
impl UnsafeUnpin for OleanWriter
impl UnwindSafe for OleanWriter
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