FormatCode

Enum FormatCode 

Source
pub enum FormatCode {
Show 49 variants RgbaFloat, RgbFloat, A8R8G8B8, X8R8G8B8, A8B8G8R8, X8B8G8R8, B8G8R8A8, B8G8R8X8, R8G8B8A8, R8G8B8X8, X14R6G6B6, X2R10G10B10, A2R10G10B10, X2B10G10R10, A2B10G10R10, A8R8G8B8sRGB, R8G8B8, B8G8R8, R5G6B5, B5G6R5, A1R5G5B5, X1R5G5B5, A1B5G5R5, X1B5G5R5, A4R4G4B4, X4R4G4B4, A4B4G4R4, X4B4G4R4, A8, R3G3B2, B2G3R3, A2R2G2B2, A2B2G2R2, C8, G8, X4A4, X4C4, X4G4, A4, R1G2B1, B1G2R1, A1R1G1B1, A1B1G1R1, C4, G4, A1, G1, YUY2, YV12,
}
Expand description

Possible format codes

Variants§

§

RgbaFloat

128bpp RgbaFloat

§

RgbFloat

96bpp RgbFloat

§

A8R8G8B8

32bpp A8R8G8B8

§

X8R8G8B8

32bpp X8R8G8B8

§

A8B8G8R8

32bpp A8B8G8R8

§

X8B8G8R8

32bpp X8B8G8R8

§

B8G8R8A8

32bpp B8G8R8A8

§

B8G8R8X8

32bpp B8G8R8X8

§

R8G8B8A8

32bpp R8G8B8A8

§

R8G8B8X8

32bpp R8G8B8X8

§

X14R6G6B6

32bpp X14R6G6B6

§

X2R10G10B10

32bpp X2R10G10B10

§

A2R10G10B10

32bpp A2R10G10B10

§

X2B10G10R10

32bpp X2B10G10R10

§

A2B10G10R10

32bpp A2B10G10R10

§

A8R8G8B8sRGB

sRGB A8R8G8B8sRGB

§

R8G8B8

24bpp R8G8B8

§

B8G8R8

24bpp B8G8R8

§

R5G6B5

16bpp R5G6B5

§

B5G6R5

16bpp B5G6R5

§

A1R5G5B5

16bpp A1R5G5B5

§

X1R5G5B5

16bpp X1R5G5B5

§

A1B5G5R5

16bpp A1B5G5R5

§

X1B5G5R5

16bpp X1B5G5R5

§

A4R4G4B4

16bpp A4R4G4B4

§

X4R4G4B4

16bpp X4R4G4B4

§

A4B4G4R4

16bpp A4B4G4R4

§

X4B4G4R4

16bpp X4B4G4R4

§

A8

8bpp A8

§

R3G3B2

8bpp R3G3B2

§

B2G3R3

8bpp B2G3R3

§

A2R2G2B2

8bpp A2R2G2B2

§

A2B2G2R2

8bpp A2B2G2R2

§

C8

8bpp C8

§

G8

8bpp G8

§

X4A4

8bpp X4A4

§

X4C4

8bpp X4C4

§

X4G4

8bpp X4G4

§

A4

4bpp A4

§

R1G2B1

4bpp R1G2B1

§

B1G2R1

4bpp B1G2R1

§

A1R1G1B1

4bpp A1R1G1B1

§

A1B1G1R1

4bpp A1B1G1R1

§

C4

4bpp C4

§

G4

4bpp G4

§

A1

1bpp A1

§

G1

1bpp G1

§

YUY2

YUV YUY2

§

YV12

YUV YV12

Implementations§

Source§

impl FormatCode

Source

pub fn bpp(code: Self) -> u32

Get the bpp for the specified format

Trait Implementations§

Source§

impl Clone for FormatCode

Source§

fn clone(&self) -> FormatCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FormatCode

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<FormatCode> for pixman_format_code_t

Source§

fn from(value: FormatCode) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for FormatCode

Source§

fn from(value: pixman_format_code_t) -> Self

Converts to this type from the input type.
Source§

impl TryFrom<DrmFourcc> for FormatCode

Available on crate feature drm-fourcc only.
Source§

type Error = UnsupportedDrmFourcc

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

fn try_from(value: DrmFourcc) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<FormatCode> for DrmFourcc

Available on crate feature drm-fourcc only.
Source§

type Error = UnsupportedFormatCode

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

fn try_from(value: FormatCode) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for FormatCode

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> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.