pub struct XBenEncoder<W: Write> { /* private fields */ }
Expand description
A struct to make the writing of XBEN files easier and more ergonomic.
Implementations§
Source§impl<W: Write> XBenEncoder<W>
impl<W: Write> XBenEncoder<W>
pub fn new(encoder: XzEncoder<W>, variant: BenVariant) -> Self
Sourcepub fn write_json_value(&mut self, data: Value) -> Result<()>
pub fn write_json_value(&mut self, data: Value) -> Result<()>
Write a an assigment vector encoded as a JSON value to the XBEN file.
Sourcepub fn write_ben_file(&mut self, reader: impl BufRead) -> Result<()>
pub fn write_ben_file(&mut self, reader: impl BufRead) -> Result<()>
Converts a raw BEN assignment file into to an XBEN file. This function will check to see if the header is there and then handle it accordingly.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for XBenEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for XBenEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for XBenEncoder<W>where
W: Send,
impl<W> Sync for XBenEncoder<W>where
W: Sync,
impl<W> Unpin for XBenEncoder<W>where
W: Unpin,
impl<W> UnwindSafe for XBenEncoder<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