pub struct TextureUsage { /* private fields */ }Expand description
A set of flags describing the allowed usages of a TextureId.
Implementations§
Source§impl TextureUsage
impl TextureUsage
Sourcepub const TEXTURE_BINDING: Self
pub const TEXTURE_BINDING: Self
The texture can be bound in a shader for sampling (reading).
Sourcepub const STORAGE_BINDING: Self
pub const STORAGE_BINDING: Self
The texture can be used as a storage texture (read/write access from shaders).
Sourcepub const RENDER_ATTACHMENT: Self
pub const RENDER_ATTACHMENT: Self
The texture can be used as a color or multisample resolve attachment in a render pass.
Sourcepub const DEPTH_STENCIL_ATTACHMENT: Self
pub const DEPTH_STENCIL_ATTACHMENT: Self
The texture can be used as a depth/stencil target (for render attachments).
Sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Creates a new bitflag set from the given raw bits. Bits not corresponding to any defined flag are kept.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true if all flags in other are contained within self.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true if any flag in other is contained within self.
Trait Implementations§
Source§impl BitAnd for TextureUsage
impl BitAnd for TextureUsage
Source§impl BitAndAssign for TextureUsage
impl BitAndAssign for TextureUsage
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moreSource§impl BitOr for TextureUsage
impl BitOr for TextureUsage
Source§impl BitOrAssign for TextureUsage
impl BitOrAssign for TextureUsage
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitXor for TextureUsage
impl BitXor for TextureUsage
Source§impl BitXorAssign for TextureUsage
impl BitXorAssign for TextureUsage
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^= operation. Read moreSource§impl Clone for TextureUsage
impl Clone for TextureUsage
Source§fn clone(&self) -> TextureUsage
fn clone(&self) -> TextureUsage
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 TextureUsage
impl Debug for TextureUsage
Source§impl Default for TextureUsage
impl Default for TextureUsage
Source§fn default() -> TextureUsage
fn default() -> TextureUsage
Returns the “default value” for a type. Read more
Source§impl Hash for TextureUsage
impl Hash for TextureUsage
Source§impl Not for TextureUsage
impl Not for TextureUsage
Source§impl PartialEq for TextureUsage
impl PartialEq for TextureUsage
impl Copy for TextureUsage
impl Eq for TextureUsage
impl StructuralPartialEq for TextureUsage
Auto Trait Implementations§
impl Freeze for TextureUsage
impl RefUnwindSafe for TextureUsage
impl Send for TextureUsage
impl Sync for TextureUsage
impl Unpin for TextureUsage
impl UnwindSafe for TextureUsage
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