Struct ben::encode::XBenEncoder
source · 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>
sourcepub fn new(encoder: XzEncoder<W>) -> Self
pub fn new(encoder: XzEncoder<W>) -> Self
Create a new XBenEncoder instance and handles the BEN file header.
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.
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