Struct curse::Face [−]
#[repr(C)]pub struct Face { /* fields omitted */ }
Methods
impl Face
impl Face
pub const BOLD: Face
BOLD: Face = Face{bits: 16,}
pub const UNDERLINE: Face
UNDERLINE: Face = Face{bits: 32,}
pub const REVERSE: Face
REVERSE: Face = Face{bits: 64,}
pub fn empty() -> Face
pub fn empty() -> Face
Returns an empty set of flags.
pub fn all() -> Face
pub fn all() -> Face
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<Face>
pub fn from_bits(bits: u8) -> Option<Face>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> Face
pub fn from_bits_truncate(bits: u8) -> Face
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: Face) -> bool
pub fn intersects(&self, other: Face) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: Face) -> bool
pub fn contains(&self, other: Face) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Face)
pub fn insert(&mut self, other: Face)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Face)
pub fn remove(&mut self, other: Face)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Face)
pub fn toggle(&mut self, other: Face)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Face, value: bool)
pub fn set(&mut self, other: Face, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Face
impl Copy for Face
impl PartialEq for Face
impl PartialEq for Face
fn eq(&self, other: &Face) -> bool
fn eq(&self, other: &Face) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Face) -> bool
fn ne(&self, other: &Face) -> bool
This method tests for !=
.
impl Eq for Face
impl Eq for Face
impl Clone for Face
impl Clone for Face
fn clone(&self) -> Face
fn clone(&self) -> Face
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 Hash for Face
impl Hash for Face
fn 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 PartialOrd for Face
impl PartialOrd for Face
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> 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: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Face
impl Debug for Face
impl Binary for Face
impl Binary for Face
impl Octal for Face
impl Octal for Face
impl LowerHex for Face
impl LowerHex for Face
impl UpperHex for Face
impl UpperHex for Face
impl BitOr for Face
impl BitOr for Face
type Output = Face
The resulting type after applying the |
operator.
fn bitor(self, other: Face) -> Face
fn bitor(self, other: Face) -> Face
Returns the union of the two sets of flags.
impl BitOrAssign for Face
impl BitOrAssign for Face
fn bitor_assign(&mut self, other: Face)
fn bitor_assign(&mut self, other: Face)
Adds the set of flags.
impl BitXor for Face
impl BitXor for Face
type Output = Face
The resulting type after applying the ^
operator.
fn bitxor(self, other: Face) -> Face
fn bitxor(self, other: Face) -> Face
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for Face
impl BitXorAssign for Face
fn bitxor_assign(&mut self, other: Face)
fn bitxor_assign(&mut self, other: Face)
Toggles the set of flags.
impl BitAnd for Face
impl BitAnd for Face
type Output = Face
The resulting type after applying the &
operator.
fn bitand(self, other: Face) -> Face
fn bitand(self, other: Face) -> Face
Returns the intersection between the two sets of flags.
impl BitAndAssign for Face
impl BitAndAssign for Face
fn bitand_assign(&mut self, other: Face)
fn bitand_assign(&mut self, other: Face)
Disables all flags disabled in the set.
impl Sub for Face
impl Sub for Face
type Output = Face
The resulting type after applying the -
operator.
fn sub(self, other: Face) -> Face
fn sub(self, other: Face) -> Face
Returns the set difference of the two sets of flags.
impl SubAssign for Face
impl SubAssign for Face
fn sub_assign(&mut self, other: Face)
fn sub_assign(&mut self, other: Face)
Disables all flags enabled in the set.
impl Not for Face
impl Not for Face
type Output = Face
The resulting type after applying the !
operator.
fn not(self) -> Face
fn not(self) -> Face
Returns the complement of this set of flags.
impl Extend<Face> for Face
impl Extend<Face> for Face
fn extend<T: IntoIterator<Item = Face>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Face>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<Face> for Face
impl FromIterator<Face> for Face
fn from_iter<T: IntoIterator<Item = Face>>(iterator: T) -> Face
fn from_iter<T: IntoIterator<Item = Face>>(iterator: T) -> Face
Creates a value from an iterator. Read more