Struct exr::meta::attribute::ChannelList [−][src]
pub struct ChannelList { pub list: SmallVec<[ChannelDescription; 5]>, pub bytes_per_pixel: usize, pub uniform_sample_type: Option<SampleType>, }
Expand description
A List of channels. Channels must be sorted alphabetically.
Fields
list: SmallVec<[ChannelDescription; 5]>
The channels in this list.
bytes_per_pixel: usize
The number of bytes that one pixel in this image needs.
uniform_sample_type: Option<SampleType>
The sample type of all channels, if all channels have the same type.
Implementations
impl ChannelList
[src]
impl ChannelList
[src]pub fn new(channels: SmallVec<[ChannelDescription; 5]>) -> Self
[src]
pub fn new(channels: SmallVec<[ChannelDescription; 5]>) -> Self
[src]Does not validate channel order.
pub fn channels_with_byte_offset(
&self
) -> impl Iterator<Item = (usize, &ChannelDescription)>
[src]
pub fn channels_with_byte_offset(
&self
) -> impl Iterator<Item = (usize, &ChannelDescription)>
[src]Iterate over the channels, and adds to each channel the byte offset of the channels sample type. Assumes the internal channel list is properly sorted.
impl ChannelList
[src]
impl ChannelList
[src]pub fn write(&self, write: &mut impl Write) -> UnitResult
[src]
pub fn write(&self, write: &mut impl Write) -> UnitResult
[src]Without validation, write this instance to the byte stream. Assumes channels are sorted alphabetically and all values are validated.
pub fn validate(
&self,
allow_sampling: bool,
data_window: IntegerBounds,
strict: bool
) -> UnitResult
[src]
pub fn validate(
&self,
allow_sampling: bool,
data_window: IntegerBounds,
strict: bool
) -> UnitResult
[src]Check if channels are valid and sorted.
Trait Implementations
impl Clone for ChannelList
[src]
impl Clone for ChannelList
[src]fn clone(&self) -> ChannelList
[src]
fn clone(&self) -> ChannelList
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for ChannelList
[src]
impl Debug for ChannelList
[src]impl Hash for ChannelList
[src]
impl Hash for ChannelList
[src]impl PartialEq<ChannelList> for ChannelList
[src]
impl PartialEq<ChannelList> for ChannelList
[src]fn eq(&self, other: &ChannelList) -> bool
[src]
fn eq(&self, other: &ChannelList) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &ChannelList) -> bool
[src]
fn ne(&self, other: &ChannelList) -> bool
[src]This method tests for !=
.
impl Eq for ChannelList
[src]
impl StructuralEq for ChannelList
[src]
impl StructuralPartialEq for ChannelList
[src]
Auto Trait Implementations
impl RefUnwindSafe for ChannelList
impl Send for ChannelList
impl Sync for ChannelList
impl Unpin for ChannelList
impl UnwindSafe for ChannelList
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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