pub struct ShaderStage { /* private fields */ }Expand description
Flags representing which shader stages can access a resource binding.
This is used in bind group layouts to specify visibility of resources. Multiple stages can be combined using bitwise operations.
Implementations§
Source§impl ShaderStageFlags
impl ShaderStageFlags
Sourcepub const NONE: ShaderStageFlags
pub const NONE: ShaderStageFlags
No shader stages.
Sourcepub const VERTEX: ShaderStageFlags
pub const VERTEX: ShaderStageFlags
Vertex shader stage.
Sourcepub const FRAGMENT: ShaderStageFlags
pub const FRAGMENT: ShaderStageFlags
Fragment shader stage.
Sourcepub const COMPUTE: ShaderStageFlags
pub const COMPUTE: ShaderStageFlags
Compute shader stage.
Sourcepub const VERTEX_FRAGMENT: ShaderStageFlags
pub const VERTEX_FRAGMENT: ShaderStageFlags
All graphics stages (vertex + fragment).
Sourcepub const ALL: ShaderStageFlags
pub const ALL: ShaderStageFlags
All stages.
Sourcepub const fn from_bits(bits: u32) -> ShaderStageFlags
pub const fn from_bits(bits: u32) -> ShaderStageFlags
Creates a new set of shader stage flags from raw bits.
Sourcepub const fn from_stage(stage: ShaderStage) -> ShaderStageFlags
pub const fn from_stage(stage: ShaderStage) -> ShaderStageFlags
Creates flags from a single shader stage.
Sourcepub const fn union(self, other: ShaderStageFlags) -> ShaderStageFlags
pub const fn union(self, other: ShaderStageFlags) -> ShaderStageFlags
Combines two sets of flags.
Sourcepub const fn contains(&self, stage: ShaderStage) -> bool
pub const fn contains(&self, stage: ShaderStage) -> bool
Checks if these flags contain a specific stage.
Trait Implementations§
Source§impl BitOr for ShaderStageFlags
impl BitOr for ShaderStageFlags
Source§type Output = ShaderStageFlags
type Output = ShaderStageFlags
The resulting type after applying the
| operator.Source§fn bitor(self, rhs: ShaderStageFlags) -> <ShaderStageFlags as BitOr>::Output
fn bitor(self, rhs: ShaderStageFlags) -> <ShaderStageFlags as BitOr>::Output
Performs the
| operation. Read moreSource§impl BitOrAssign for ShaderStageFlags
impl BitOrAssign for ShaderStageFlags
Source§fn bitor_assign(&mut self, rhs: ShaderStageFlags)
fn bitor_assign(&mut self, rhs: ShaderStageFlags)
Performs the
|= operation. Read moreSource§impl Clone for ShaderStageFlags
impl Clone for ShaderStageFlags
Source§fn clone(&self) -> ShaderStageFlags
fn clone(&self) -> ShaderStageFlags
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 ShaderStageFlags
impl Debug for ShaderStageFlags
Source§impl Hash for ShaderStageFlags
impl Hash for ShaderStageFlags
Source§impl PartialEq for ShaderStageFlags
impl PartialEq for ShaderStageFlags
impl Copy for ShaderStageFlags
impl Eq for ShaderStageFlags
impl StructuralPartialEq for ShaderStageFlags
Auto Trait Implementations§
impl Freeze for ShaderStageFlags
impl RefUnwindSafe for ShaderStageFlags
impl Send for ShaderStageFlags
impl Sync for ShaderStageFlags
impl Unpin for ShaderStageFlags
impl UnwindSafe for ShaderStageFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.