Struct Reader

pub struct Reader<R> { /* private fields */ }

Decode the meta data from a byte source, keeping the source ready for further reading. Continue decoding the remaining bytes by calling filtered_chunks or all_chunks.

Implementations

impl<R: Read + Seek> Reader<R>

fn read_from_buffered(read: R, pedantic: bool) -> Result<Self>

Start the reading process. Immediately decodes the meta data into an internal field. Access it viameta_data().

const fn meta_data(&self) -> &MetaData

The decoded exr meta data from the file.

fn headers(&self) -> &[Header]

The decoded exr meta data from the file.

fn into_meta_data(self) -> MetaData

Obtain the meta data ownership.

fn all_chunks(self, pedantic: bool) -> Result<AllChunksReader<R>>

Prepare to read all the chunks from the file. Does not decode the chunks now, but returns a decoder. Reading all chunks reduces seeking the file, but some chunks might be read without being used.

fn filter_chunks(self, pedantic: bool, filter: impl FnMut(&MetaData, TileCoordinates, BlockIndex) -> bool) -> Result<FilteredChunksReader<R>>

Prepare to read some the chunks from the file. Does not decode the chunks now, but returns a decoder. Reading only some chunks may seeking the file, potentially skipping many bytes.

Trait Implementations

impl<R: Debug> Debug for Reader<R>

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

Auto Trait Implementations

impl<R> !RefUnwindSafe for Reader<R>

impl<R> !UnwindSafe for Reader<R>

impl<R> Freeze for Reader<R> where PeekRead<Tracking<R>>: Freeze,

impl<R> Send for Reader<R> where PeekRead<Tracking<R>>: Send,

impl<R> Sync for Reader<R> where PeekRead<Tracking<R>>: Sync,

impl<R> Unpin for Reader<R> where PeekRead<Tracking<R>>: Unpin,

impl<R> UnsafeUnpin for Reader<R> where PeekRead<Tracking<R>>: UnsafeUnpin,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Reader<R> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Reader<R> where ST: ?Sized, DT: ?Sized,

impl<T> Any for Reader<R> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Reader<R> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Reader<R> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Reader<R>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for Reader<R>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for Reader<R> where T: ?Sized,

impl<T, U> Into<U> for Reader<R> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Reader<R> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Reader<R> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>