Enum Unit

#[repr(u8)]
pub enum Unit

Physical unit of the pixel dimensions

Variants

Unspecified = 0
Meter = 1

Implementations

impl Unit

fn from_u8(n: u8) -> Option<Unit>

u8 -> Self. Temporary solution until Rust provides a canonical one.

Trait Implementations

impl Clone for Unit

fn clone(&self) -> Self

impl Copy for Unit

impl Debug for Unit

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

impl Eq for Unit

impl PartialEq for Unit

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

impl StructuralPartialEq for Unit

Auto Trait Implementations

impl Freeze for Unit

impl RefUnwindSafe for Unit

impl Send for Unit

impl Sync for Unit

impl Unpin for Unit

impl UnsafeUnpin for Unit

impl UnwindSafe for Unit

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Unit

fn from(t: T) -> T

Returns the argument unchanged.

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

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

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

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

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

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