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