pub struct AwfWriter<W: Write> { /* private fields */ }Expand description
Writes .awf binary files.
Implementations§
Source§impl<W: Write> AwfWriter<W>
impl<W: Write> AwfWriter<W>
pub fn new(writer: W) -> Self
Sourcepub fn write_header(&mut self) -> WorkflowResult<()>
pub fn write_header(&mut self) -> WorkflowResult<()>
Write the file header.
Sourcepub fn write_section_header(
&mut self,
section_type: SectionType,
data_len: u32,
) -> WorkflowResult<()>
pub fn write_section_header( &mut self, section_type: SectionType, data_len: u32, ) -> WorkflowResult<()>
Write a section header.
Sourcepub fn write_workflow(&mut self, workflow: &Workflow) -> WorkflowResult<()>
pub fn write_workflow(&mut self, workflow: &Workflow) -> WorkflowResult<()>
Write a workflow to the registry section.
Sourcepub fn write_json_section(
&mut self,
section_type: SectionType,
data: &Value,
) -> WorkflowResult<()>
pub fn write_json_section( &mut self, section_type: SectionType, data: &Value, ) -> WorkflowResult<()>
Write raw JSON data as a section.
Sourcepub fn finish(self) -> WorkflowResult<W>
pub fn finish(self) -> WorkflowResult<W>
Finish writing and flush.
Sourcepub fn workflow_count(&self) -> u32
pub fn workflow_count(&self) -> u32
Get counts.
Auto Trait Implementations§
impl<W> Freeze for AwfWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for AwfWriter<W>where
W: RefUnwindSafe,
impl<W> Send for AwfWriter<W>where
W: Send,
impl<W> Sync for AwfWriter<W>where
W: Sync,
impl<W> Unpin for AwfWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for AwfWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for AwfWriter<W>where
W: UnwindSafe,
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