#[non_exhaustive]pub enum Format {
Show 30 variants
R8Unorm,
Rg8Unorm,
Rgba8Unorm,
Rgba8Srgb,
Bgra8Unorm,
Bgra8Srgb,
Rgb10a2Unorm,
Rg11b10Float,
R16Float,
Rg16Float,
Rgba16Float,
R32Uint,
R32Sint,
R32Float,
Rg32Uint,
Rg32Float,
Rgba32Uint,
Rgba32Float,
Depth16,
Depth32Float,
Depth24Stencil8,
Depth32FloatStencil8,
Bc1Unorm,
Bc1Srgb,
Bc3Unorm,
Bc3Srgb,
Bc4Unorm,
Bc5Unorm,
Bc7Unorm,
Bc7Srgb,
}Expand description
texel formats
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
R8Unorm
Rg8Unorm
Rgba8Unorm
Rgba8Srgb
Bgra8Unorm
Bgra8Srgb
Rgb10a2Unorm
Rg11b10Float
R16Float
Rg16Float
Rgba16Float
R32Uint
R32Sint
R32Float
Rg32Uint
Rg32Float
Rgba32Uint
Rgba32Float
Depth16
Depth32Float
Depth24Stencil8
Depth32FloatStencil8
Bc1Unorm
Bc1Srgb
Bc3Unorm
Bc3Srgb
Bc4Unorm
Bc5Unorm
Bc7Unorm
Bc7Srgb
Implementations§
Source§impl Format
impl Format
Sourcepub const fn block_bytes(self) -> u32
pub const fn block_bytes(self) -> u32
bytes per texel block (a texel, or a 4 x 4 block of a compressed format)
Sourcepub const fn block_dim(self) -> u32
pub const fn block_dim(self) -> u32
the block’s width and height in texels (4 for compressed formats, else 1)
pub const fn is_compressed(self) -> bool
pub const fn is_depth(self) -> bool
pub const fn has_stencil(self) -> bool
pub const fn is_srgb(self) -> bool
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Forget for Format
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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