Struct misc_utils::fs::WriteOptions [] [src]

pub struct WriteOptions { /* fields omitted */ }

Configure behaviour of the file_open_write function.

Defaults

WriteOptions {
    buffer_capacity: None,
    compression_level: Compression::Default,
    filetype: FileType::PlainText,
    open_options: OpenOptions::new(),
    threads: 1,
};

Methods

impl WriteOptions
[src]

[src]

Create a new WriteOptions with default settings.

[src]

Sets the capacity of the BufReader to capacity in Bytes.

[src]

Sets the compression level for archives.

This configures the compression level used. This option has no effect if the FileType is PlainText. See Compression for a description of the possible values.

[src]

Sets the output filetype.

This specifies if the file will be plaintext or which archive form will be used. See FileType for details on the possible values.

[src]

Specify a set of OpenOptions to use.

The option read will always be overwritten to false and write will always be set to true.

This allows to specify flags like append or truncate while writing.

[src]

Specify the maximal number of threads used for compression.

This gives a hint to the encoder that threading is wanted. This feature is currently only used with xz. The writer will the value of threads as a maximal number.

Setting this option to 0 has the same effect as setting it to 1.

Trait Implementations

impl Clone for WriteOptions
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for WriteOptions
[src]

[src]

Formats the value using the given formatter.

impl Default for WriteOptions
[src]

[src]

Returns the "default value" for a type. Read more

impl PartialEq for WriteOptions
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for WriteOptions
[src]