Struct MetaData
pub struct MetaData { pub requirements: Requirements, pub headers: Headers }
Contains the complete meta data of an exr image.
Defines how the image is split up in the file, the number and type of images and channels, and various other attributes. The usage of custom attributes is encouraged.
Fields
requirements: RequirementsSome flags summarizing the features that must be supported to decode the file.
headers: HeadersOne header to describe each layer in this file.
Implementations
impl MetaData
fn read_from_file(path: impl AsRef<Path>, pedantic: bool) -> Result<Self>Read the exr meta data from a file. Use
read_from_unbufferedinstead if you do not have a file. Does not validate the meta data.fn read_from_unbuffered(unbuffered: impl Read, pedantic: bool) -> Result<Self>Buffer the reader and then read the exr meta data from it. Use
read_from_bufferedif your reader is an in-memory reader. Useread_from_fileif you have a file path. Does not validate the meta data.fn read_from_buffered(buffered: impl Read, pedantic: bool) -> Result<Self>Read the exr meta data from a reader. Use
read_from_fileif you have a file path. Useread_from_unbufferedif this is not an in-memory reader. Does not validate the meta data.fn read_offset_tables(read: &mut PeekRead<impl Read>, headers: &Headers) -> Result<OffsetTables>Read one offset table from the reader for each header.
fn skip_offset_tables(read: &mut PeekRead<impl Read>, headers: &Headers) -> Result<usize>Skip the offset tables by advancing the reader by the required byte count.
fn enumerate_ordered_header_block_indices(&self) -> impl '_ + Iterator<Item = (usize, BlockIndex)>This iterator tells you the block indices of all blocks that must be in the image. The order of the blocks depends on the
LineOrderattribute (unspecified line order is treated the same as increasing line order). The blocks written to the file must be exactly in this order, except for when theLineOrderis unspecified. The index represents the block index, in increasing line order, within the header.fn collect_ordered_blocks<'s>(&'s self, get_block: impl 's + FnMut(BlockIndex) -> UncompressedBlock) -> impl 's + Iterator<Item = (usize, UncompressedBlock)>Go through all the block indices in the correct order and call the specified closure for each of these blocks. That way, the blocks indices are filled with real block data and returned as an iterator. The closure returns the an
UncompressedBlockfor each block index.fn collect_ordered_block_data<'s>(&'s self, get_block_data: impl 's + FnMut(BlockIndex) -> Vec<u8>) -> impl 's + Iterator<Item = (usize, UncompressedBlock)>Go through all the block indices in the correct order and call the specified closure for each of these blocks. That way, the blocks indices are filled with real block data and returned as an iterator. The closure returns the byte data for each block index.
fn validate(headers: &[Header], pedantic: bool) -> Result<Requirements>Validates this meta data. Returns the minimal possible requirements.
Trait Implementations
impl Clone for MetaData
fn clone(&self) -> Self
impl Debug for MetaData
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl PartialEq for MetaData
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for MetaData
Auto Trait Implementations
impl Freeze for MetaData
impl RefUnwindSafe for MetaData
impl Send for MetaData
impl Sync for MetaData
impl Unpin for MetaData
impl UnsafeUnpin for MetaData
impl UnwindSafe for MetaData
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for MetaData
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for MetaData
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for MetaData
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MetaData
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MetaData
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for MetaData
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for MetaData
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for MetaData
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for MetaData
where
T: ?Sized,
impl<T> ToOwned for MetaData
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for MetaData
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MetaData
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for MetaData
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>