Struct nannou::wgpu::ShaderStage [−]
#[repr(transparent)]pub struct ShaderStage { /* fields omitted */ }
Expand description
Describes the shader stages that a binding will be visible from.
These can be combined so something that is visible from both vertex and fragment shaders can be defined as:
ShaderStage::VERTEX | ShaderStage::FRAGMENT
Implementations
impl ShaderStage
impl ShaderStage
pub const NONE: ShaderStage
pub const NONE: ShaderStage
Binding is not visible from any shader stage.
pub const VERTEX: ShaderStage
pub const VERTEX: ShaderStage
Binding is visible from the vertex shader of a render pipeline.
pub const FRAGMENT: ShaderStage
pub const FRAGMENT: ShaderStage
Binding is visible from the fragment shader of a render pipeline.
pub const VERTEX_FRAGMENT: ShaderStage
pub const VERTEX_FRAGMENT: ShaderStage
Binding is visible from the vertex and fragment shaders of a render pipeline.
pub const COMPUTE: ShaderStage
pub const COMPUTE: ShaderStage
Binding is visible from the compute shader of a compute pipeline.
pub const fn empty() -> ShaderStage
pub const fn empty() -> ShaderStage
Returns an empty set of flags
pub const fn all() -> ShaderStage
pub const fn all() -> ShaderStage
Returns the set containing all flags.
pub fn from_bits(bits: u32) -> Option<ShaderStage>
pub fn from_bits(bits: u32) -> Option<ShaderStage>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> ShaderStage
pub const fn from_bits_truncate(bits: u32) -> ShaderStage
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> ShaderStage
pub const unsafe fn from_bits_unchecked(bits: u32) -> ShaderStage
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn intersects(&self, other: ShaderStage) -> bool
pub const fn intersects(&self, other: ShaderStage) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: ShaderStage) -> bool
pub const fn contains(&self, other: ShaderStage) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: ShaderStage)
pub fn insert(&mut self, other: ShaderStage)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: ShaderStage)
pub fn remove(&mut self, other: ShaderStage)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: ShaderStage)
pub fn toggle(&mut self, other: ShaderStage)
Toggles the specified flags in-place.
pub fn set(&mut self, other: ShaderStage, value: bool)
pub fn set(&mut self, other: ShaderStage, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for ShaderStage
impl Binary for ShaderStage
impl BitAnd<ShaderStage> for ShaderStage
impl BitAnd<ShaderStage> for ShaderStage
pub fn bitand(self, other: ShaderStage) -> ShaderStage
pub fn bitand(self, other: ShaderStage) -> ShaderStage
Returns the intersection between the two sets of flags.
type Output = ShaderStage
type Output = ShaderStage
The resulting type after applying the &
operator.
impl BitAndAssign<ShaderStage> for ShaderStage
impl BitAndAssign<ShaderStage> for ShaderStage
pub fn bitand_assign(&mut self, other: ShaderStage)
pub fn bitand_assign(&mut self, other: ShaderStage)
Disables all flags disabled in the set.
impl BitOr<ShaderStage> for ShaderStage
impl BitOr<ShaderStage> for ShaderStage
pub fn bitor(self, other: ShaderStage) -> ShaderStage
pub fn bitor(self, other: ShaderStage) -> ShaderStage
Returns the union of the two sets of flags.
type Output = ShaderStage
type Output = ShaderStage
The resulting type after applying the |
operator.
impl BitOrAssign<ShaderStage> for ShaderStage
impl BitOrAssign<ShaderStage> for ShaderStage
pub fn bitor_assign(&mut self, other: ShaderStage)
pub fn bitor_assign(&mut self, other: ShaderStage)
Adds the set of flags.
impl BitXor<ShaderStage> for ShaderStage
impl BitXor<ShaderStage> for ShaderStage
pub fn bitxor(self, other: ShaderStage) -> ShaderStage
pub fn bitxor(self, other: ShaderStage) -> ShaderStage
Returns the left flags, but with all the right flags toggled.
type Output = ShaderStage
type Output = ShaderStage
The resulting type after applying the ^
operator.
impl BitXorAssign<ShaderStage> for ShaderStage
impl BitXorAssign<ShaderStage> for ShaderStage
pub fn bitxor_assign(&mut self, other: ShaderStage)
pub fn bitxor_assign(&mut self, other: ShaderStage)
Toggles the set of flags.
impl Clone for ShaderStage
impl Clone for ShaderStage
pub fn clone(&self) -> ShaderStage
pub fn clone(&self) -> ShaderStage
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for ShaderStage
impl Debug for ShaderStage
impl Extend<ShaderStage> for ShaderStage
impl Extend<ShaderStage> for ShaderStage
pub fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ShaderStage>,
pub fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ShaderStage>,
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl FromIterator<ShaderStage> for ShaderStage
impl FromIterator<ShaderStage> for ShaderStage
pub fn from_iter<T>(iterator: T) -> ShaderStage where
T: IntoIterator<Item = ShaderStage>,
pub fn from_iter<T>(iterator: T) -> ShaderStage where
T: IntoIterator<Item = ShaderStage>,
Creates a value from an iterator. Read more
impl Hash for ShaderStage
impl Hash for ShaderStage
impl LowerHex for ShaderStage
impl LowerHex for ShaderStage
impl Not for ShaderStage
impl Not for ShaderStage
pub fn not(self) -> ShaderStage
pub fn not(self) -> ShaderStage
Returns the complement of this set of flags.
type Output = ShaderStage
type Output = ShaderStage
The resulting type after applying the !
operator.
impl Octal for ShaderStage
impl Octal for ShaderStage
impl Ord for ShaderStage
impl Ord for ShaderStage
pub fn cmp(&self, other: &ShaderStage) -> Ordering
pub fn cmp(&self, other: &ShaderStage) -> Ordering
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
impl PartialEq<ShaderStage> for ShaderStage
impl PartialEq<ShaderStage> for ShaderStage
pub fn eq(&self, other: &ShaderStage) -> bool
pub fn eq(&self, other: &ShaderStage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ShaderStage) -> bool
pub fn ne(&self, other: &ShaderStage) -> bool
This method tests for !=
.
impl PartialOrd<ShaderStage> for ShaderStage
impl PartialOrd<ShaderStage> for ShaderStage
pub fn partial_cmp(&self, other: &ShaderStage) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ShaderStage) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl Sub<ShaderStage> for ShaderStage
impl Sub<ShaderStage> for ShaderStage
pub fn sub(self, other: ShaderStage) -> ShaderStage
pub fn sub(self, other: ShaderStage) -> ShaderStage
Returns the set difference of the two sets of flags.
type Output = ShaderStage
type Output = ShaderStage
The resulting type after applying the -
operator.
impl SubAssign<ShaderStage> for ShaderStage
impl SubAssign<ShaderStage> for ShaderStage
pub fn sub_assign(&mut self, other: ShaderStage)
pub fn sub_assign(&mut self, other: ShaderStage)
Disables all flags enabled in the set.
impl UpperHex for ShaderStage
impl UpperHex for ShaderStage
impl Copy for ShaderStage
impl Eq for ShaderStage
impl StructuralEq for ShaderStage
impl StructuralPartialEq for ShaderStage
Auto Trait Implementations
impl RefUnwindSafe for ShaderStage
impl Send for ShaderStage
impl Sync for ShaderStage
impl Unpin for ShaderStage
impl UnwindSafe for ShaderStage
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V