Struct gfx_core::target::Mirror [−]
pub struct Mirror { /* fields omitted */ }
Mirroring flags, used for blitting
Methods
impl Mirror
impl Mirror
pub const X: Mirror
X: Mirror = Mirror{bits: 1,}
pub const Y: Mirror
Y: Mirror = Mirror{bits: 2,}
pub fn empty() -> Mirror
pub fn empty() -> Mirror
Returns an empty set of flags.
pub fn all() -> Mirror
pub fn all() -> Mirror
Returns the set containing all flags.
pub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u8) -> Option<Mirror>
pub fn from_bits(bits: u8) -> Option<Mirror>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> Mirror
pub fn from_bits_truncate(bits: u8) -> Mirror
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: Mirror) -> bool
pub fn intersects(&self, other: Mirror) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: Mirror) -> bool
pub fn contains(&self, other: Mirror) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Mirror)
pub fn insert(&mut self, other: Mirror)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Mirror)
pub fn remove(&mut self, other: Mirror)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Mirror)
pub fn toggle(&mut self, other: Mirror)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Mirror, value: bool)
pub fn set(&mut self, other: Mirror, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl BitOrAssign<Mirror> for Mirror
impl BitOrAssign<Mirror> for Mirror
fn bitor_assign(&mut self, other: Mirror)
fn bitor_assign(&mut self, other: Mirror)
Adds the set of flags.
impl UpperHex for Mirror
impl UpperHex for Mirror
impl LowerHex for Mirror
impl LowerHex for Mirror
impl BitAnd<Mirror> for Mirror
impl BitAnd<Mirror> for Mirror
type Output = Mirror
The resulting type after applying the &
operator.
fn bitand(self, other: Mirror) -> Mirror
fn bitand(self, other: Mirror) -> Mirror
Returns the intersection between the two sets of flags.
impl Extend<Mirror> for Mirror
impl Extend<Mirror> for Mirror
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = Mirror>,
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = Mirror>,
Extends a collection with the contents of an iterator. Read more
impl PartialOrd<Mirror> for Mirror
impl PartialOrd<Mirror> for Mirror
fn partial_cmp(&self, other: &Mirror) -> Option<Ordering>
fn partial_cmp(&self, other: &Mirror) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Mirror) -> bool
fn lt(&self, other: &Mirror) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Mirror) -> bool
fn le(&self, other: &Mirror) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Mirror) -> bool
fn gt(&self, other: &Mirror) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Mirror) -> bool
fn ge(&self, other: &Mirror) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for Mirror
impl Hash for Mirror
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
fn hash<__H>(&self, state: &mut __H) where
__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]
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 Sub<Mirror> for Mirror
impl Sub<Mirror> for Mirror
type Output = Mirror
The resulting type after applying the -
operator.
fn sub(self, other: Mirror) -> Mirror
fn sub(self, other: Mirror) -> Mirror
Returns the set difference of the two sets of flags.
impl BitOr<Mirror> for Mirror
impl BitOr<Mirror> for Mirror
type Output = Mirror
The resulting type after applying the |
operator.
fn bitor(self, other: Mirror) -> Mirror
fn bitor(self, other: Mirror) -> Mirror
Returns the union of the two sets of flags.
impl FromIterator<Mirror> for Mirror
impl FromIterator<Mirror> for Mirror
fn from_iter<T>(iterator: T) -> Mirror where
T: IntoIterator<Item = Mirror>,
fn from_iter<T>(iterator: T) -> Mirror where
T: IntoIterator<Item = Mirror>,
Creates a value from an iterator. Read more
impl Clone for Mirror
impl Clone for Mirror
fn clone(&self) -> Mirror
fn clone(&self) -> Mirror
Returns 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 SubAssign<Mirror> for Mirror
impl SubAssign<Mirror> for Mirror
fn sub_assign(&mut self, other: Mirror)
fn sub_assign(&mut self, other: Mirror)
Disables all flags enabled in the set.
impl Debug for Mirror
impl Debug for Mirror
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl BitXor<Mirror> for Mirror
impl BitXor<Mirror> for Mirror
type Output = Mirror
The resulting type after applying the ^
operator.
fn bitxor(self, other: Mirror) -> Mirror
fn bitxor(self, other: Mirror) -> Mirror
Returns the left flags, but with all the right flags toggled.
impl Ord for Mirror
impl Ord for Mirror
fn cmp(&self, other: &Mirror) -> Ordering
fn cmp(&self, other: &Mirror) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Copy for Mirror
impl Copy for Mirror
impl Binary for Mirror
impl Binary for Mirror
impl Eq for Mirror
impl Eq for Mirror
impl BitAndAssign<Mirror> for Mirror
impl BitAndAssign<Mirror> for Mirror
fn bitand_assign(&mut self, other: Mirror)
fn bitand_assign(&mut self, other: Mirror)
Disables all flags disabled in the set.
impl PartialEq<Mirror> for Mirror
impl PartialEq<Mirror> for Mirror
fn eq(&self, other: &Mirror) -> bool
fn eq(&self, other: &Mirror) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Mirror) -> bool
fn ne(&self, other: &Mirror) -> bool
This method tests for !=
.
impl Octal for Mirror
impl Octal for Mirror
impl BitXorAssign<Mirror> for Mirror
impl BitXorAssign<Mirror> for Mirror
fn bitxor_assign(&mut self, other: Mirror)
fn bitxor_assign(&mut self, other: Mirror)
Toggles the set of flags.
impl Not for Mirror
impl Not for Mirror