Struct CompressedTileBlock

pub struct CompressedTileBlock { pub coordinates: TileCoordinates, pub compressed_pixels_le: Vec<u8> }

This Block is a tile of flat (non-deep) data. Corresponds to type attribute tiledimage. The byte data is in little-endian format, as these bytes will be written into the file directly.

Fields

coordinates: TileCoordinates

The tile location.

compressed_pixels_le: Vec<u8>

One or more scan lines may be stored together as a scan line block. The number of scan lines per block depends on how the pixel data are compressed. For each line in the tile, for each channel, the row values are contiguous. This data is compressed and in little-endian format.

Implementations

impl CompressedTileBlock

fn write<W: Write>(&self, write: &mut W) -> UnitResult

Without validation, write this instance to the byte stream.

fn read(read: &mut impl Read, max_block_byte_size: usize) -> Result<Self>

Read the value without validating.

Trait Implementations

impl Clone for CompressedTileBlock

fn clone(&self) -> Self

impl Debug for CompressedTileBlock

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

Auto Trait Implementations

impl Freeze for CompressedTileBlock

impl RefUnwindSafe for CompressedTileBlock

impl Send for CompressedTileBlock

impl Sync for CompressedTileBlock

impl Unpin for CompressedTileBlock

impl UnsafeUnpin for CompressedTileBlock

impl UnwindSafe for CompressedTileBlock

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CompressedTileBlock where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CompressedTileBlock where T: ?Sized,

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

impl<T> CloneToUninit for CompressedTileBlock where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for CompressedTileBlock

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for CompressedTileBlock

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 CompressedTileBlock where T: ?Sized,

impl<T> ToOwned for CompressedTileBlock where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for CompressedTileBlock 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 CompressedTileBlock where U: Into<T>,

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

impl<T, U> TryInto<U> for CompressedTileBlock where U: TryFrom<T>,

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