Struct dd_lib::io::conv::Converter

source ·
pub struct Converter {
    pub encode_to: EncodeTo,
    pub case: Case,
    pub swap_bytes: bool,
}
Expand description

A converter modifies the blocks read from a Reader before they are written to a Writer

Fields

encode_to: EncodeTo

The text encoding to convert to, if any

case: Case

The case to convert text to, if any

swap_bytes: bool

Whether or not to swap pairs of bytes

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
modify a slice of T in-place.
modify a copy of T created using clone(). This is less efficient than convert_copy Read more
modify a copy of T. This is more efficient than convert_clone but has tighter bounds. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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.