Enum wgpu::CompareFunction
source · [−]#[repr(C)]
pub enum CompareFunction {
Never,
Less,
Equal,
LessEqual,
Greater,
NotEqual,
GreaterEqual,
Always,
}
Expand description
Comparison function used for depth and stencil operations.
Corresponds to WebGPU GPUCompareFunction
.
Variants
Never
Function never passes
Less
Function passes if new value less than existing value
Equal
Function passes if new value is equal to existing value
LessEqual
Function passes if new value is less than or equal to existing value
Greater
Function passes if new value is greater than existing value
NotEqual
Function passes if new value is not equal to existing value
GreaterEqual
Function passes if new value is greater than or equal to existing value
Always
Function always passes
Implementations
sourceimpl CompareFunction
impl CompareFunction
sourcepub fn needs_ref_value(self) -> bool
pub fn needs_ref_value(self) -> bool
Returns true if the comparison depends on the reference value.
Trait Implementations
sourceimpl Clone for CompareFunction
impl Clone for CompareFunction
sourcefn clone(&self) -> CompareFunction
fn clone(&self) -> CompareFunction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CompareFunction
impl Debug for CompareFunction
sourceimpl<'de> Deserialize<'de> for CompareFunction
impl<'de> Deserialize<'de> for CompareFunction
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<CompareFunction, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CompareFunction, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for CompareFunction
impl Hash for CompareFunction
sourceimpl PartialEq<CompareFunction> for CompareFunction
impl PartialEq<CompareFunction> for CompareFunction
sourceimpl Serialize for CompareFunction
impl Serialize for CompareFunction
sourcefn 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 Copy for CompareFunction
impl Eq for CompareFunction
impl StructuralEq for CompareFunction
impl StructuralPartialEq for CompareFunction
Auto Trait Implementations
impl RefUnwindSafe for CompareFunction
impl Send for CompareFunction
impl Sync for CompareFunction
impl Unpin for CompareFunction
impl UnwindSafe for CompareFunction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.