pub struct ReadOptionalChannel<ReadChannels, Sample> { /* private fields */ }
Expand description

Used to read another specific channel from an image. Contains the previous ReadChannels objects.

Trait Implementations

Check for duplicate channel names.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

A separate internal reader for the pixels. Will be of type Recursive<_, SampleReader<_>>, depending on the pixels of the specific channel combination. Read more

Create a separate internal reader for the pixels of the specific channel combination.

Plan to read an additional channel from the image, with the specified name. If the channel cannot be found in the image when the image is read, the image will not be loaded. The generic parameter can usually be inferred from the closure in collect_pixels. Read more

Plan to read an additional channel from the image, with the specified name. If the file does not contain this channel, the specified default sample will be returned instead. You can check whether the channel has been loaded by checking the presence of the optional channel description before instantiating your own image. The generic parameter can usually be inferred from the closure in collect_pixels. Read more

Using two closures, define how to store the pixels. The first closure creates an image, and the second closure inserts a single pixel. The type of the pixel can be defined by the second closure; it must be a tuple containing f16, f32, u32 or Sample values. See the examples for more information. 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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.