Struct Preview

pub struct Preview { pub size: Vec2<usize>, pub pixel_data: Vec<i8> }

A small rgba image of i8 values that approximates the real exr image.

Fields

size: Vec2<usize>

The dimensions of the preview image.

pixel_data: Vec<i8>

An array with a length of 4 × width × height. The pixels are stored in LineOrder::Increasing. Each pixel consists of the four u8 values red, green, blue, alpha.

Implementations

impl Preview

fn byte_size(&self) -> 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, strict: bool) -> UnitResult

Validate this instance.

Trait Implementations

impl Clone for Preview

fn clone(&self) -> Self

impl Debug for Preview

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

impl Eq for Preview

impl PartialEq for Preview

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

impl StructuralPartialEq for Preview

Auto Trait Implementations

impl Freeze for Preview

impl RefUnwindSafe for Preview

impl Send for Preview

impl Sync for Preview

impl Unpin for Preview

impl UnsafeUnpin for Preview

impl UnwindSafe for Preview

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Preview

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for Preview

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

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

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

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

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

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

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