Skip to main content

TiffSource

Trait TiffSource 

Source
pub trait TiffSource: Send + Sync {
    // Required methods
    fn len(&self) -> u64;
    fn read_exact_at(&self, offset: u64, len: usize) -> Result<Vec<u8>>;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn as_slice(&self) -> Option<&[u8]> { ... }
}
Expand description

Random-access byte source for TIFF decoding.

Required Methods§

Source

fn len(&self) -> u64

Total object length in bytes.

Source

fn read_exact_at(&self, offset: u64, len: usize) -> Result<Vec<u8>>

Read exactly len bytes starting at offset.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true when the source has no bytes.

Source

fn as_slice(&self) -> Option<&[u8]>

Expose a whole-object slice when the source is fully resident in memory.

Implementors§