#[repr(C)]pub struct TextureDescriptorBase<L> {
pub label: L,
pub size: Extent3d,
pub mip_level_count: u32,
pub sample_count: u32,
pub dimension: TextureDimension,
pub format: TextureFormat,
pub usage: TextureUsage,
}
Expand description
Describes a [Texture
].
Fields§
§label: L
Debug label of the texture. This will show up in graphics debuggers for easy identification.
size: Extent3d
Size of the texture. For a regular 1D/2D texture, the unused sizes will be 1. For 2DArray textures, Z is the number of 2D textures in that array.
mip_level_count: u32
Mip count of texture. For a texture with no extra mips, this must be 1.
sample_count: u32
Sample count of texture. If this is not 1, texture must have BindingType::SampledTexture::multisampled
set to true.
dimension: TextureDimension
Dimensions of the texture.
format: TextureFormat
Format of the texture.
usage: TextureUsage
Allowed usages of the texture. If used in other ways, the operation will panic.
Implementations§
Source§impl<L> TextureDescriptor<L>
impl<L> TextureDescriptor<L>
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> TextureDescriptor<K>
Trait Implementations§
Source§impl<L> Clone for TextureDescriptor<L>where
L: Clone,
impl<L> Clone for TextureDescriptor<L>where
L: Clone,
Source§fn clone(&self) -> TextureDescriptor<L>
fn clone(&self) -> TextureDescriptor<L>
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<L> Debug for TextureDescriptor<L>where
L: Debug,
impl<L> Debug for TextureDescriptor<L>where
L: Debug,
Source§impl<'de, L> Deserialize<'de> for TextureDescriptor<L>where
L: Deserialize<'de>,
impl<'de, L> Deserialize<'de> for TextureDescriptor<L>where
L: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextureDescriptor<L>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextureDescriptor<L>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<L> Hash for TextureDescriptor<L>where
L: Hash,
impl<L> Hash for TextureDescriptor<L>where
L: Hash,
Source§impl<L> PartialEq for TextureDescriptor<L>where
L: PartialEq,
impl<L> PartialEq for TextureDescriptor<L>where
L: PartialEq,
Source§impl<L> Serialize for TextureDescriptor<L>where
L: Serialize,
impl<L> Serialize for TextureDescriptor<L>where
L: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<L> Eq for TextureDescriptor<L>where
L: Eq,
impl<L> StructuralPartialEq for TextureDescriptor<L>
Auto Trait Implementations§
impl<L> Freeze for TextureDescriptor<L>where
L: Freeze,
impl<L> RefUnwindSafe for TextureDescriptor<L>where
L: RefUnwindSafe,
impl<L> Send for TextureDescriptor<L>where
L: Send,
impl<L> Sync for TextureDescriptor<L>where
L: Sync,
impl<L> Unpin for TextureDescriptor<L>where
L: Unpin,
impl<L> UnwindSafe for TextureDescriptor<L>where
L: UnwindSafe,
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