pub enum PixelFormat {
Known(FourCC),
Unknown(u32),
}Expand description
像素格式的高级枚举,包含元数据
Variants§
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
判断是否为压缩格式 (JPEG, H264)
Sourcepub fn bpp_estimate(&self) -> u32
pub fn bpp_estimate(&self) -> u32
估算每像素比特数 (Bits Per Pixel),用于计算带宽
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate 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 From<FourCC> for PixelFormat
impl From<FourCC> for PixelFormat
Source§impl From<u32> for PixelFormat
impl From<u32> for PixelFormat
Source§impl PartialEq<FourCC> for PixelFormat
impl PartialEq<FourCC> for PixelFormat
Source§impl PartialEq<PixelFormat> for FourCC
impl PartialEq<PixelFormat> for FourCC
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
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 UnsafeUnpin 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