[][src]Struct exr::meta::attributes::ChannelList

pub struct ChannelList {
    pub list: SmallVec<[Channel; 5]>,
    pub bytes_per_pixel: usize,
}

A List of channels. Channels must be sorted alphabetically.

Fields

list: SmallVec<[Channel; 5]>

The channels in this list.

bytes_per_pixel: usize

The number of bytes that one pixel in this image needs.

Methods

impl ChannelList[src]

pub fn new(channels: SmallVec<[Channel; 5]>) -> Self[src]

Does not validate channel order.

impl ChannelList[src]

pub fn byte_size(&self) -> usize[src]

Number of bytes this would consume in an exr file.

pub fn write(&self, write: &mut impl Write) -> PassiveResult[src]

Without validation, write this instance to the byte stream. Assumes channels are sorted alphabetically and all values are validated.

pub fn read(read: &mut PeekRead<impl Read>) -> Result<Self>[src]

Read the value without validating.

pub fn validate(&self, allow_sampling: bool, strict: bool) -> PassiveResult[src]

Check if channels are valid and sorted.

Trait Implementations

impl Clone for ChannelList[src]

impl Debug for ChannelList[src]

impl Eq for ChannelList[src]

impl PartialEq<ChannelList> for ChannelList[src]

impl StructuralEq for ChannelList[src]

impl StructuralPartialEq for ChannelList[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.