Struct exr::image::read::specific_channels::ReadOptionalChannel[][src]

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

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

Trait Implementations

impl<Inner: CheckDuplicates, Sample> CheckDuplicates for ReadOptionalChannel<Inner, Sample>[src]

fn already_contains(&self, name: &Text) -> bool[src]

Check for duplicate channel names.

impl<ReadChannels: Clone, Sample: Clone> Clone for ReadOptionalChannel<ReadChannels, Sample>[src]

fn clone(&self) -> ReadOptionalChannel<ReadChannels, Sample>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<ReadChannels: Debug, Sample: Debug> Debug for ReadOptionalChannel<ReadChannels, Sample>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<DefaultSample, ReadChannels> ReadSpecificChannel for ReadOptionalChannel<ReadChannels, DefaultSample> where
    ReadChannels: ReadSpecificChannel,
    DefaultSample: FromNativeSample + 'static, 
[src]

type RecursivePixelReader = Recursive<ReadChannels::RecursivePixelReader, OptionalSampleReader<DefaultSample>>

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

fn create_recursive_reader(
    &self,
    channels: &ChannelList
) -> Result<Self::RecursivePixelReader>
[src]

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

fn required<Sample>(
    self,
    channel_name: impl Into<Text>
) -> ReadRequiredChannel<Self, Sample>
[src]

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

fn optional<Sample>(
    self,
    channel_name: impl Into<Text>,
    default_sample: Sample
) -> ReadOptionalChannel<Self, Sample>
[src]

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

fn collect_pixels<Pixel, PixelStorage, CreatePixels, SetPixel>(
    self,
    create_pixels: CreatePixels,
    set_pixel: SetPixel
) -> CollectPixels<Self, Pixel, PixelStorage, CreatePixels, SetPixel> where
    <Self::RecursivePixelReader as RecursivePixelReader>::RecursivePixel: IntoTuple<Pixel>,
    <Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions: IntoNonRecursive,
    CreatePixels: Fn(Vec2<usize>, &<<Self::RecursivePixelReader as RecursivePixelReader>::RecursiveChannelDescriptions as IntoNonRecursive>::NonRecursive) -> PixelStorage,
    SetPixel: Fn(&mut PixelStorage, Vec2<usize>, Pixel), 
[src]

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

impl<ReadChannels, Sample> RefUnwindSafe for ReadOptionalChannel<ReadChannels, Sample> where
    ReadChannels: RefUnwindSafe,
    Sample: RefUnwindSafe

impl<ReadChannels, Sample> Send for ReadOptionalChannel<ReadChannels, Sample> where
    ReadChannels: Send,
    Sample: Send

impl<ReadChannels, Sample> Sync for ReadOptionalChannel<ReadChannels, Sample> where
    ReadChannels: Sync,
    Sample: Sync

impl<ReadChannels, Sample> Unpin for ReadOptionalChannel<ReadChannels, Sample> where
    ReadChannels: Unpin,
    Sample: Unpin

impl<ReadChannels, Sample> UnwindSafe for ReadOptionalChannel<ReadChannels, Sample> where
    ReadChannels: UnwindSafe,
    Sample: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.