Enum ResolutionUnit

#[non_exhaustive]
#[repr(u16)]
pub enum ResolutionUnit

Type to represent resolution units

Variants

None = 1
Inch = 2
Centimeter = 3

Implementations

impl ResolutionUnit

const fn from_u16(val: u16) -> Option<Self>
const fn to_u16(&self) -> u16

Trait Implementations

impl Clone for ResolutionUnit

fn clone(&self) -> ResolutionUnit

impl Copy for ResolutionUnit

impl Debug for ResolutionUnit

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

impl Eq for ResolutionUnit

impl Hash for ResolutionUnit

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

impl PartialEq for ResolutionUnit

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

impl StructuralPartialEq for ResolutionUnit

impl TiffValue for ResolutionUnit

const BYTE_LEN: u8 = <u16 as TiffValue>::BYTE_LEN;
const FIELD_TYPE: Type = Type::SHORT;
fn count(&self) -> usize
fn data(&self) -> Cow<'_, [u8]>

Auto Trait Implementations

impl Freeze for ResolutionUnit

impl RefUnwindSafe for ResolutionUnit

impl Send for ResolutionUnit

impl Sync for ResolutionUnit

impl Unpin for ResolutionUnit

impl UnsafeUnpin for ResolutionUnit

impl UnwindSafe for ResolutionUnit

Blanket Implementations

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

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

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for ResolutionUnit

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Read<Exclusive, BecauseExclusive> for ResolutionUnit where T: ?Sized,

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

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

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

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

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

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