Struct ChannelList
pub struct ChannelList { pub list: SmallVec<[ChannelDescription; 5]>, pub bytes_per_pixel: usize, pub uniform_sample_type: Option<SampleType> }
A List of channels. Channels must be sorted alphabetically.
Fields
list: SmallVec<[ChannelDescription; 5]>The channels in this list.
bytes_per_pixel: usizeThe 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
fn new(channels: SmallVec<[ChannelDescription; 5]>) -> SelfDoes not validate channel order.
fn channels_with_byte_offset(&self) -> impl Iterator<Item = (usize, &ChannelDescription)>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.
fn find_index_of_channel(&self, exact_name: &Text) -> Option<usize>Return the index of the channel with the exact name, case sensitive, or none. Potentially uses less than linear time.
impl ChannelList
fn byte_size(&self) -> usizeNumber of bytes this would consume in an exr file.
fn write(&self, write: &mut impl Write) -> UnitResultWithout validation, write this instance to the byte stream. Assumes channels are sorted alphabetically and all values are validated.
fn read(read: &mut PeekRead<impl Read>) -> Result<Self>Read the value without validating.
fn validate(&self, allow_sampling: bool, data_window: IntegerBounds, strict: bool) -> UnitResultCheck if channels are valid and sorted.
Trait Implementations
impl Clone for ChannelList
fn clone(&self) -> Self
impl Debug for ChannelList
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for ChannelList
impl Hash for ChannelList
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for ChannelList
fn eq(&self, other: &Self) -> bool