Enum Encoding

Source
#[repr(C)]
pub enum Encoding {
Show 48 variants Unknown = 0, RGB8 = 1, RGBA8 = 2, RGB16 = 3, RGBA16 = 4, BGR8 = 5, BGRA8 = 6, BGR16 = 7, BGRA16 = 8, MONO8 = 9, MONO16 = 10, Type8UC1 = 11, Type8UC2 = 12, Type8UC3 = 13, Type8UC4 = 14, Type8SC1 = 15, Type8SC2 = 16, Type8SC3 = 17, Type8SC4 = 18, Type16UC1 = 19, Type16UC2 = 20, Type16UC3 = 21, Type16UC4 = 22, Type16SC1 = 23, Type16SC2 = 24, Type16SC3 = 25, Type16SC4 = 26, Type32SC1 = 27, Type32SC2 = 28, Type32SC3 = 29, Type32SC4 = 30, Type32FC1 = 31, Type32FC2 = 32, Type32FC3 = 33, Type32FC4 = 34, Type64FC1 = 35, Type64FC2 = 36, Type64FC3 = 37, Type64FC4 = 38, BayerRGGB8 = 39, BayerBGGR8 = 40, BayerGBRG8 = 41, BayerGRBG8 = 42, BayerRGGB16 = 43, BayerBGGR16 = 44, BayerGBRG16 = 45, BayerGrbg16 = 46, YUV422 = 47,
}

Variants§

§

Unknown = 0

§

RGB8 = 1

§

RGBA8 = 2

§

RGB16 = 3

§

RGBA16 = 4

§

BGR8 = 5

§

BGRA8 = 6

§

BGR16 = 7

§

BGRA16 = 8

§

MONO8 = 9

§

MONO16 = 10

§

Type8UC1 = 11

§

Type8UC2 = 12

§

Type8UC3 = 13

§

Type8UC4 = 14

§

Type8SC1 = 15

§

Type8SC2 = 16

§

Type8SC3 = 17

§

Type8SC4 = 18

§

Type16UC1 = 19

§

Type16UC2 = 20

§

Type16UC3 = 21

§

Type16UC4 = 22

§

Type16SC1 = 23

§

Type16SC2 = 24

§

Type16SC3 = 25

§

Type16SC4 = 26

§

Type32SC1 = 27

§

Type32SC2 = 28

§

Type32SC3 = 29

§

Type32SC4 = 30

§

Type32FC1 = 31

§

Type32FC2 = 32

§

Type32FC3 = 33

§

Type32FC4 = 34

§

Type64FC1 = 35

§

Type64FC2 = 36

§

Type64FC3 = 37

§

Type64FC4 = 38

§

BayerRGGB8 = 39

§

BayerBGGR8 = 40

§

BayerGBRG8 = 41

§

BayerGRBG8 = 42

§

BayerRGGB16 = 43

§

BayerBGGR16 = 44

§

BayerGBRG16 = 45

§

BayerGrbg16 = 46

§

YUV422 = 47

Implementations§

Source§

impl Encoding

Source

pub const fn num_channels(&self) -> usize

Source

pub fn is_mono(&self) -> bool

Source

pub fn is_color(&self) -> bool

Source

pub fn has_alpha(&self) -> bool

Source

pub const fn bit_depth(&self) -> usize

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for Encoding

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Encoding

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Encoding

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Encoding

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,