Struct yenc::DecodeOptions[][src]

pub struct DecodeOptions<P> { /* fields omitted */ }

Options for decoding. The entry point for decoding from a file or (TCP) stream to an output directory.

Methods

impl<P> DecodeOptions<P> where
    P: AsRef<Path>, 
[src]

Construct new DecodeOptions using the specified path as output directory. The output directory is

Decodes the input file in a new output file.

If ok, returns the path of the decoded file.

Example

let decode_options = yenc::DecodeOptions::new("/tmp/decoded");
decode_options.decode_file("test2.bin.yenc");

Errors

  • when the output file already exists
  • when I/O error occurs

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

impl<P: Debug> Debug for DecodeOptions<P>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<P> Send for DecodeOptions<P> where
    P: Send

impl<P> Sync for DecodeOptions<P> where
    P: Sync