pub struct Tile { /* private fields */ }
Expand description
A TIFF Tile response.
This contains the required information to decode the tile. Decoding is separated from fetching so that sync and async operations can be separated and non-blocking.
This is returned by fetch_tile
.
Implementations§
Source§impl Tile
impl Tile
Sourcepub fn compressed_bytes(&self) -> &Bytes
pub fn compressed_bytes(&self) -> &Bytes
Access the compressed bytes underlying this tile.
Note that Bytes
is reference-counted, so it is very cheap to clone if needed.
Sourcepub fn compression_method(&self) -> CompressionMethod
pub fn compression_method(&self) -> CompressionMethod
Access the compression tag representing this tile.
Sourcepub fn photometric_interpretation(&self) -> PhotometricInterpretation
pub fn photometric_interpretation(&self) -> PhotometricInterpretation
Access the photometric interpretation tag representing this tile.
Sourcepub fn jpeg_tables(&self) -> Option<&Bytes>
pub fn jpeg_tables(&self) -> Option<&Bytes>
Access the JPEG Tables, if any, from the IFD producing this tile.
Note that Bytes
is reference-counted, so it is very cheap to clone if needed.
Sourcepub fn decode(
self,
decoder_registry: &DecoderRegistry,
) -> AsyncTiffResult<Bytes>
pub fn decode( self, decoder_registry: &DecoderRegistry, ) -> AsyncTiffResult<Bytes>
Decode this tile.
Decoding is separate from fetching so that sync and async operations do not block the same runtime.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnwindSafe for Tile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more