pub struct CollectedTile {
pub coord: TileCoord,
pub width: u32,
pub height: u32,
pub data: Vec<u8>,
pub raster: Raster,
}Expand description
A snapshot of a tile captured by MemorySink.
Stores the tile’s coordinate, dimensions, and raw pixel bytes so that tests
can inspect tile output without needing to decode an image format. Created
automatically when MemorySink::write_tile is called.
§Examples
See observability tests for assertions on collected tiles.
Fields§
§coord: TileCoord§width: u32§height: u32§data: Vec<u8>§raster: RasterFull raster snapshot of the collected tile (same pixel data as
CollectedTile::data but wrapped in a Raster so tests can call
tile.raster.data().len() like they would on a Tile).
Trait Implementations§
Source§impl Clone for CollectedTile
impl Clone for CollectedTile
Source§fn clone(&self) -> CollectedTile
fn clone(&self) -> CollectedTile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CollectedTile
impl RefUnwindSafe for CollectedTile
impl Send for CollectedTile
impl Sync for CollectedTile
impl Unpin for CollectedTile
impl UnsafeUnpin for CollectedTile
impl UnwindSafe for CollectedTile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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