Enum machine_vision_formats::pixel_format::PixFmt[][src]

#[non_exhaustive]
pub enum PixFmt {
Show variants Mono8, Mono32f, RGB8, BayerRG8, BayerRG32f, BayerBG8, BayerBG32f, BayerGB8, BayerGB32f, BayerGR8, BayerGR32f, YUV444, YUV422, NV12,
}
Expand description

This type allows runtime inspection of pixel format.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mono8
Mono32f
RGB8
BayerRG8
BayerRG32f
BayerBG8
BayerBG32f
BayerGB8
BayerGB32f
BayerGR8
BayerGR32f
YUV444
YUV422
NV12

Implementations

impl PixFmt[src]

pub fn to_static<FMT: PixelFormat>(&self) -> Option<PhantomData<FMT>>[src]

Convert a runtime variant into a static type.

pub const fn bits_per_pixel(&self) -> u8[src]

The average number of bits per pixel.

pub const fn as_str(&self) -> &'static str[src]

The name of the pixel format.

Trait Implementations

impl Clone for PixFmt[src]

fn clone(&self) -> PixFmt[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PixFmt[src]

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

Formats the value using the given formatter. Read more

impl Display for PixFmt[src]

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

Formats the value using the given formatter. Read more

impl FromStr for PixFmt[src]

type Err = &'static str

The associated error which can be returned from parsing.

fn from_str(instr: &str) -> Result<Self, <Self as FromStr>::Err>[src]

Parses a string s to return a value of this type. Read more

impl PartialEq<PixFmt> for PixFmt[src]

fn eq(&self, other: &PixFmt) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<FMT> TryFrom<PhantomData<FMT>> for PixFmt where
    FMT: PixelFormat
[src]

type Error = &'static str

The type returned in the event of a conversion error.

fn try_from(orig: PhantomData<FMT>) -> Result<PixFmt, Self::Error>[src]

Performs the conversion.

impl Copy for PixFmt[src]

impl StructuralPartialEq for PixFmt[src]

Auto Trait Implementations

impl RefUnwindSafe for PixFmt

impl Send for PixFmt

impl Sync for PixFmt

impl Unpin for PixFmt

impl UnwindSafe for PixFmt

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.