pub struct DecodeOptions<P> { /* private fields */ }
Expand description
Options for decoding. The entry point for decoding from a file or (TCP) stream to an output directory.
Implementations§
Source§impl<P> DecodeOptions<P>
impl<P> DecodeOptions<P>
Sourcepub fn new(output_dir: P) -> DecodeOptions<P>
pub fn new(output_dir: P) -> DecodeOptions<P>
Construct new DecodeOptions using the specified path as output directory. The output directory is
Sourcepub fn decode_file(
&self,
input_filename: &str,
) -> Result<Box<Path>, DecodeError>
pub fn decode_file( &self, input_filename: &str, ) -> Result<Box<Path>, DecodeError>
Sourcepub fn decode_stream<R>(&self, read_stream: R) -> Result<Box<Path>, DecodeError>where
R: Read,
pub fn decode_stream<R>(&self, read_stream: R) -> Result<Box<Path>, DecodeError>where
R: Read,
Decodes the data from a stream to the specified directory.
Writes the output to a file with the filename from the header line, and places it in the output path. The path of the output file is returned as String.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for DecodeOptions<P>where
P: Freeze,
impl<P> RefUnwindSafe for DecodeOptions<P>where
P: RefUnwindSafe,
impl<P> Send for DecodeOptions<P>where
P: Send,
impl<P> Sync for DecodeOptions<P>where
P: Sync,
impl<P> Unpin for DecodeOptions<P>where
P: Unpin,
impl<P> UnwindSafe for DecodeOptions<P>where
P: 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