Struct gfx_core::shade::Usage [−]
pub struct Usage { /* fields omitted */ }Parameter usage flags.
Methods
impl Usage
impl Usagepub const VERTEX: Usage
VERTEX: Usage = Usage{bits: 1,}
Used by the vertex shader
pub const GEOMETRY: Usage
GEOMETRY: Usage = Usage{bits: 2,}
Used by the geometry shader
pub const PIXEL: Usage
PIXEL: Usage = Usage{bits: 4,}
Used by the pixel shader
pub const HULL: Usage
HULL: Usage = Usage{bits: 8,}
Used by the hull shader
pub const DOMAIN: Usage
DOMAIN: Usage = Usage{bits: 22,}
Used by the pixel shader
pub fn empty() -> Usage
pub fn empty() -> UsageReturns an empty set of flags.
pub fn all() -> Usage
pub fn all() -> UsageReturns the set containing all flags.
pub fn bits(&self) -> u8
pub fn bits(&self) -> u8Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u8) -> Option<Usage>
pub fn from_bits(bits: u8) -> Option<Usage>Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> Usage
pub fn from_bits_truncate(bits: u8) -> UsageConvert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> boolReturns true if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> boolReturns true if all flags are currently set.
pub fn intersects(&self, other: Usage) -> bool
pub fn intersects(&self, other: Usage) -> boolReturns true if there are flags common to both self and other.
pub fn contains(&self, other: Usage) -> bool
pub fn contains(&self, other: Usage) -> boolReturns true all of the flags in other are contained within self.
pub fn insert(&mut self, other: Usage)
pub fn insert(&mut self, other: Usage)Inserts the specified flags in-place.
pub fn remove(&mut self, other: Usage)
pub fn remove(&mut self, other: Usage)Removes the specified flags in-place.
pub fn toggle(&mut self, other: Usage)
pub fn toggle(&mut self, other: Usage)Toggles the specified flags in-place.
pub fn set(&mut self, other: Usage, value: bool)
pub fn set(&mut self, other: Usage, value: bool)Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Usage
impl Copy for Usageimpl PartialEq for Usage
impl PartialEq for Usagefn eq(&self, other: &Usage) -> bool
fn eq(&self, other: &Usage) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Usage) -> bool
fn ne(&self, other: &Usage) -> boolThis method tests for !=.
impl Eq for Usage
impl Eq for Usageimpl Clone for Usage
impl Clone for Usagefn clone(&self) -> Usage
fn clone(&self) -> UsageReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialOrd for Usage
impl PartialOrd for Usagefn partial_cmp(&self, other: &Usage) -> Option<Ordering>
fn partial_cmp(&self, other: &Usage) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Usage) -> bool
fn lt(&self, other: &Usage) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Usage) -> bool
fn le(&self, other: &Usage) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Usage) -> bool
fn gt(&self, other: &Usage) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Usage) -> bool
fn ge(&self, other: &Usage) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Usage
impl Ord for Usagefn cmp(&self, other: &Usage) -> Ordering
fn cmp(&self, other: &Usage) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Hash for Usage
impl Hash for Usagefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Usage
impl Debug for Usageimpl Binary for Usage
impl Binary for Usageimpl Octal for Usage
impl Octal for Usageimpl LowerHex for Usage
impl LowerHex for Usageimpl UpperHex for Usage
impl UpperHex for Usageimpl BitOr for Usage
impl BitOr for Usagetype Output = Usage
The resulting type after applying the | operator.
fn bitor(self, other: Usage) -> Usage
fn bitor(self, other: Usage) -> UsageReturns the union of the two sets of flags.
impl BitOrAssign for Usage
impl BitOrAssign for Usagefn bitor_assign(&mut self, other: Usage)
fn bitor_assign(&mut self, other: Usage)Adds the set of flags.
impl BitXor for Usage
impl BitXor for Usagetype Output = Usage
The resulting type after applying the ^ operator.
fn bitxor(self, other: Usage) -> Usage
fn bitxor(self, other: Usage) -> UsageReturns the left flags, but with all the right flags toggled.
impl BitXorAssign for Usage
impl BitXorAssign for Usagefn bitxor_assign(&mut self, other: Usage)
fn bitxor_assign(&mut self, other: Usage)Toggles the set of flags.
impl BitAnd for Usage
impl BitAnd for Usagetype Output = Usage
The resulting type after applying the & operator.
fn bitand(self, other: Usage) -> Usage
fn bitand(self, other: Usage) -> UsageReturns the intersection between the two sets of flags.
impl BitAndAssign for Usage
impl BitAndAssign for Usagefn bitand_assign(&mut self, other: Usage)
fn bitand_assign(&mut self, other: Usage)Disables all flags disabled in the set.
impl Sub for Usage
impl Sub for Usagetype Output = Usage
The resulting type after applying the - operator.
fn sub(self, other: Usage) -> Usage
fn sub(self, other: Usage) -> UsageReturns the set difference of the two sets of flags.
impl SubAssign for Usage
impl SubAssign for Usagefn sub_assign(&mut self, other: Usage)
fn sub_assign(&mut self, other: Usage)Disables all flags enabled in the set.
impl Not for Usage
impl Not for Usagetype Output = Usage
The resulting type after applying the ! operator.
fn not(self) -> Usage
fn not(self) -> UsageReturns the complement of this set of flags.
impl Extend<Usage> for Usage
impl Extend<Usage> for Usagefn extend<T: IntoIterator<Item = Usage>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Usage>>(&mut self, iterator: T)Extends a collection with the contents of an iterator. Read more
impl FromIterator<Usage> for Usage
impl FromIterator<Usage> for Usagefn from_iter<T: IntoIterator<Item = Usage>>(iterator: T) -> Usage
fn from_iter<T: IntoIterator<Item = Usage>>(iterator: T) -> UsageCreates a value from an iterator. Read more
impl From<Stage> for Usage[src]
impl From<Stage> for Usage