#[repr(i32)]pub enum PixelFormat {
Show 15 variants
Unknown = 0,
Custom = -4,
Translucent = -3,
Transparent = -2,
Opaque = -1,
Rgba8888 = 1,
Rgbx8888 = 2,
Rgb888 = 3,
Rgb565 = 4,
Bgra8888 = 5,
Rgba5551 = 6,
Rgba4444 = 7,
RgbaFp16 = 22,
Rgba1010102 = 43,
R8 = 56,
}
Variants§
Unknown = 0
Custom = -4
Translucent = -3
Transparent = -2
Opaque = -1
Rgba8888 = 1
Rgbx8888 = 2
Rgb888 = 3
Rgb565 = 4
Bgra8888 = 5
Rgba5551 = 6
Rgba4444 = 7
RgbaFp16 = 22
Rgba1010102 = 43
R8 = 56
Implementations§
Source§impl PixelFormat
impl PixelFormat
Source§impl PixelFormat
impl PixelFormat
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Default for PixelFormat
impl Default for PixelFormat
Source§fn default() -> PixelFormat
fn default() -> PixelFormat
Returns the “default value” for a type. Read more
Source§impl From<PixelFormat> for i32
impl From<PixelFormat> for i32
Source§fn from(value: PixelFormat) -> i32
fn from(value: PixelFormat) -> i32
Converts to this type from the input type.
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl Ord for PixelFormat
impl Ord for PixelFormat
Source§fn cmp(&self, other: &PixelFormat) -> Ordering
fn cmp(&self, other: &PixelFormat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
Source§impl PartialOrd for PixelFormat
impl PartialOrd for PixelFormat
Source§impl TryFrom<i32> for PixelFormat
impl TryFrom<i32> for PixelFormat
Source§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<PixelFormat, DecodeError>
fn try_from(value: i32) -> Result<PixelFormat, DecodeError>
Performs the conversion.
impl Copy for PixelFormat
impl Eq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more