Struct TileDescription

pub struct TileDescription { pub tile_size: Vec2<usize>, pub level_mode: LevelMode, pub rounding_mode: RoundingMode }

Describes how the layer is divided into tiles. Specifies the size of each tile in the image and whether this image contains multiple resolution levels.

Fields

tile_size: Vec2<usize>

The size of each tile. Stays the same number of pixels across all levels.

level_mode: LevelMode

Whether to also store smaller versions of the image.

rounding_mode: RoundingMode

Whether to round up or down when calculating Mip/Rip levels.

Implementations

impl TileDescription

const fn byte_size() -> usize

Number of bytes this would consume in an exr file.

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

Without validation, write this instance to the byte stream.

fn read<R: Read>(read: &mut R) -> Result<Self>

Read the value without validating.

fn validate(&self) -> UnitResult

Validate this instance.

Trait Implementations

impl Clone for TileDescription

fn clone(&self) -> Self

impl Copy for TileDescription

impl Debug for TileDescription

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

impl Eq for TileDescription

impl Hash for TileDescription

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for TileDescription

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for TileDescription

Auto Trait Implementations

impl Freeze for TileDescription

impl RefUnwindSafe for TileDescription

impl Send for TileDescription

impl Sync for TileDescription

impl Unpin for TileDescription

impl UnsafeUnpin for TileDescription

impl UnwindSafe for TileDescription

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for TileDescription

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for TileDescription

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

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

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

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

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

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

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