Struct dd_lib::opts::Opts

source ·
pub struct Opts {
Show 13 fields pub cflags: Conv, pub iflags: In, pub oflags: Out, pub mode: Mode, pub count: Option<usize>, pub files: Option<usize>, pub input_block_size: usize, pub input_file: Option<String>, pub input_seek: Option<usize>, pub output_block_size: usize, pub output_file: Option<String>, pub output_seek: Option<usize>, pub status: StatusLevel,
}
Expand description

The parsed and handled user options.

Fields

cflags: Conv

convert the file as per the comma separated symbol list

iflags: In

handle the input as per the comma-separated symbol list (see flags::In)

oflags: Out

handle the output as per the comma-separated symbol list (see flags::Out)

mode: Mode

The main mode to run in. Can be Mode::Standard, Mode::Block(usize), Mode::Unblock(usize)

count: Option<usize>

The limit in bytes or blocks to read

files: Option<usize>

Copy n input files before terminating. This operand is only applicable when the input device is a tape.

input_block_size: usize

The block size of the input, in bytes. Default is 512.

input_file: Option<String>

The input file, if any. input_file == None -> stdin

input_seek: Option<usize>

How many input_block_sized blocks to seek on the input. If also flags::In::SEEK_BYTES, seek that many bytes instead

output_block_size: usize

The block size of the output, in bytes. Default is 512.

output_file: Option<String>

The output file, if any. output_file == None -> stdout

output_seek: Option<usize>

How many output_block_sized blocks to seek on the output file. Incompatible with output_file==None

status: StatusLevel

Implementations

whether a flag is set

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Kind of option; used for reporting errors
Slice of valid but as yet unimplemented options
check if a flag is valid but unimplemented
helper function; an invalid flag key

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.