[go: up one dir, main page]

Enum gbm::Format[][src]

#[repr(u32)]
pub enum Format {
Show variants Abgr1555, Abgr16161616f, Abgr2101010, Abgr4444, Abgr8888, Argb1555, Argb16161616f, Argb2101010, Argb4444, Argb8888, Axbxgxrx106106106106, Ayuv, Bgr233, Bgr565, Bgr565_a8, Bgr888, Bgr888_a8, Bgra1010102, Bgra4444, Bgra5551, Bgra8888, Bgrx1010102, Bgrx4444, Bgrx5551, Bgrx8888, Bgrx8888_a8, Big_endian, C8, Gr1616, Gr88, Nv12, Nv15, Nv16, Nv21, Nv24, Nv42, Nv61, P010, P012, P016, P210, Q401, Q410, R16, R8, Rg1616, Rg88, Rgb332, Rgb565, Rgb565_a8, Rgb888, Rgb888_a8, Rgba1010102, Rgba4444, Rgba5551, Rgba8888, Rgbx1010102, Rgbx4444, Rgbx5551, Rgbx8888, Rgbx8888_a8, Uyvy, Vuy101010, Vuy888, Vyuy, X0l0, X0l2, Xbgr1555, Xbgr16161616f, Xbgr2101010, Xbgr4444, Xbgr8888, Xbgr8888_a8, Xrgb1555, Xrgb16161616f, Xrgb2101010, Xrgb4444, Xrgb8888, Xrgb8888_a8, Xvyu12_16161616, Xvyu16161616, Xvyu2101010, Xyuv8888, Y0l0, Y0l2, Y210, Y212, Y216, Y410, Y412, Y416, Yuv410, Yuv411, Yuv420, Yuv420_10bit, Yuv420_8bit, Yuv422, Yuv444, Yuyv, Yvu410, Yvu411, Yvu420, Yvu422, Yvu444, Yvyu,
}

Variants

Abgr1555
Abgr16161616f
Abgr2101010
Abgr4444
Abgr8888
Argb1555
Argb16161616f
Argb2101010
Argb4444
Argb8888
Axbxgxrx106106106106
Ayuv
Bgr233
Bgr565
Bgr565_a8
Bgr888
Bgr888_a8
Bgra1010102
Bgra4444
Bgra5551
Bgra8888
Bgrx1010102
Bgrx4444
Bgrx5551
Bgrx8888
Bgrx8888_a8
Big_endian
C8
Gr1616
Gr88
Nv12
Nv15
Nv16
Nv21
Nv24
Nv42
Nv61
P010
P012
P016
P210
Q401
Q410
R16
R8
Rg1616
Rg88
Rgb332
Rgb565
Rgb565_a8
Rgb888
Rgb888_a8
Rgba1010102
Rgba4444
Rgba5551
Rgba8888
Rgbx1010102
Rgbx4444
Rgbx5551
Rgbx8888
Rgbx8888_a8
Uyvy
Vuy101010
Vuy888
Vyuy
X0l0
X0l2
Xbgr1555
Xbgr16161616f
Xbgr2101010
Xbgr4444
Xbgr8888
Xbgr8888_a8
Xrgb1555
Xrgb16161616f
Xrgb2101010
Xrgb4444
Xrgb8888
Xrgb8888_a8
Xvyu12_16161616
Xvyu16161616
Xvyu2101010
Xyuv8888
Y0l0
Y0l2
Y210
Y212
Y216
Y410
Y412
Y416
Yuv410
Yuv411
Yuv420
Yuv420_10bit
Yuv420_8bit
Yuv422
Yuv444
Yuyv
Yvu410
Yvu411
Yvu420
Yvu422
Yvu444
Yvyu

Implementations

impl DrmFourcc[src]

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

Get the string representation of the format’s fourcc.

Trait Implementations

impl Clone for DrmFourcc[src]

pub fn clone(&self) -> DrmFourcc[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 DrmFourcc[src]

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

Formats the value using the given formatter. Read more

impl Display for DrmFourcc[src]

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

Formats the value using the given formatter. Read more

impl Hash for DrmFourcc[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<DrmFourcc> for DrmFourcc[src]

pub fn eq(&self, other: &DrmFourcc) -> 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 TryFrom<u32> for DrmFourcc[src]

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

Convert from an u32

assert_eq!(DrmFourcc::try_from(875710274).unwrap(), DrmFourcc::Bgr888);

assert!(DrmFourcc::try_from(0).is_err());

// If the u32 is in the valid format to be a fourcc, you can see its string form
assert_eq!(DrmFourcc::try_from(828601953).unwrap_err().string_form(), Some("avc1".to_string()));

type Error = UnrecognizedFourcc

The type returned in the event of a conversion error.

impl Copy for DrmFourcc[src]

impl Eq for DrmFourcc[src]

impl StructuralEq for DrmFourcc[src]

impl StructuralPartialEq for DrmFourcc[src]

Auto Trait Implementations

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> Downcast for T where
    T: Any

pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

pub fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

impl<T> DowncastSync for T where
    T: Any + Send + Sync

pub fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + 'static + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. 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.