Struct gfx::shade::Usage
[−]
[src]
pub struct Usage { /* fields omitted */ }
Parameter usage flags.
Methods
impl Usage
[src]
const VERTEX: Usage
VERTEX: Usage = Usage{bits: 1,}
const GEOMETRY: Usage
GEOMETRY: Usage = Usage{bits: 2,}
const PIXEL: Usage
PIXEL: Usage = Usage{bits: 4,}
const HULL: Usage
HULL: Usage = Usage{bits: 8,}
const DOMAIN: Usage
DOMAIN: Usage = Usage{bits: 22,}
fn empty() -> Usage
[src]
Returns an empty set of flags.
fn all() -> Usage
[src]
Returns the set containing all flags.
fn bits(&self) -> u8
[src]
Returns the raw value of the flags currently stored.
fn from_bits(bits: u8) -> Option<Usage>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
fn from_bits_truncate(bits: u8) -> Usage
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
fn intersects(&self, other: Usage) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
fn contains(&self, other: Usage) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
fn insert(&mut self, other: Usage)
[src]
Inserts the specified flags in-place.
fn remove(&mut self, other: Usage)
[src]
Removes the specified flags in-place.
fn toggle(&mut self, other: Usage)
[src]
Toggles the specified flags in-place.
fn set(&mut self, other: Usage, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Ord for Usage
[src]
impl Copy for Usage
[src]
impl Clone for Usage
[src]
fn clone(&self) -> Usage
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl BitAndAssign<Usage> for Usage
[src]
fn bitand_assign(&mut self, other: Usage)
[src]
Disables all flags disabled in the set.
impl BitAnd<Usage> for Usage
[src]
type Output = Usage
fn bitand(self, other: Usage) -> Usage
[src]
Returns the intersection between the two sets of flags.
impl UpperHex for Usage
[src]
impl PartialOrd<Usage> for Usage
[src]
fn partial_cmp(&self, __arg_0: &Usage) -> Option<Ordering>
[src]
fn lt(&self, __arg_0: &Usage) -> bool
[src]
fn le(&self, __arg_0: &Usage) -> bool
[src]
fn gt(&self, __arg_0: &Usage) -> bool
[src]
fn ge(&self, __arg_0: &Usage) -> bool
[src]
impl Hash for Usage
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Not for Usage
[src]
impl BitXor<Usage> for Usage
[src]
type Output = Usage
fn bitxor(self, other: Usage) -> Usage
[src]
Returns the left flags, but with all the right flags toggled.
impl From<Stage> for Usage
[src]
impl BitOr<Usage> for Usage
[src]
type Output = Usage
fn bitor(self, other: Usage) -> Usage
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<Usage> for Usage
[src]
fn bitor_assign(&mut self, other: Usage)
[src]
Adds the set of flags.
impl Octal for Usage
[src]
impl PartialEq<Usage> for Usage
[src]
fn eq(&self, __arg_0: &Usage) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Usage) -> bool
[src]
This method tests for !=
.
impl Debug for Usage
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl Extend<Usage> for Usage
[src]
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = Usage>,
[src]
T: IntoIterator<Item = Usage>,
impl SubAssign<Usage> for Usage
[src]
fn sub_assign(&mut self, other: Usage)
[src]
Disables all flags enabled in the set.
impl BitXorAssign<Usage> for Usage
[src]
fn bitxor_assign(&mut self, other: Usage)
[src]
Toggles the set of flags.
impl Eq for Usage
[src]
impl Binary for Usage
[src]
impl FromIterator<Usage> for Usage
[src]
fn from_iter<T>(iterator: T) -> Usage where
T: IntoIterator<Item = Usage>,
[src]
T: IntoIterator<Item = Usage>,