pub struct AnchorHints { /* private fields */ }
Implementations§
Source§impl AnchorHints
impl AnchorHints
pub const FLIP_X: AnchorHints
pub const FLIP_Y: AnchorHints
pub const SLIDE_X: AnchorHints
pub const SLIDE_Y: AnchorHints
pub const RESIZE_X: AnchorHints
pub const RESIZE_Y: AnchorHints
pub const FLIP: AnchorHints
pub const SLIDE: AnchorHints
pub const RESIZE: AnchorHints
Sourcepub const fn empty() -> AnchorHints
pub const fn empty() -> AnchorHints
Returns an empty set of flags
Sourcepub const fn all() -> AnchorHints
pub const fn all() -> AnchorHints
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<AnchorHints>
pub fn from_bits(bits: u32) -> Option<AnchorHints>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> AnchorHints
pub const fn from_bits_truncate(bits: u32) -> AnchorHints
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> AnchorHints
pub const unsafe fn from_bits_unchecked(bits: u32) -> AnchorHints
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: AnchorHints) -> bool
pub const fn intersects(&self, other: AnchorHints) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: AnchorHints) -> bool
pub const fn contains(&self, other: AnchorHints) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: AnchorHints)
pub fn insert(&mut self, other: AnchorHints)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: AnchorHints)
pub fn remove(&mut self, other: AnchorHints)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: AnchorHints)
pub fn toggle(&mut self, other: AnchorHints)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: AnchorHints, value: bool)
pub fn set(&mut self, other: AnchorHints, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for AnchorHints
impl Binary for AnchorHints
Source§impl BitAnd for AnchorHints
impl BitAnd for AnchorHints
Source§fn bitand(self, other: AnchorHints) -> AnchorHints
fn bitand(self, other: AnchorHints) -> AnchorHints
Returns the intersection between the two sets of flags.
Source§type Output = AnchorHints
type Output = AnchorHints
&
operator.Source§impl BitAndAssign for AnchorHints
impl BitAndAssign for AnchorHints
Source§fn bitand_assign(&mut self, other: AnchorHints)
fn bitand_assign(&mut self, other: AnchorHints)
Disables all flags disabled in the set.
Source§impl BitOr for AnchorHints
impl BitOr for AnchorHints
Source§fn bitor(self, other: AnchorHints) -> AnchorHints
fn bitor(self, other: AnchorHints) -> AnchorHints
Returns the union of the two sets of flags.
Source§type Output = AnchorHints
type Output = AnchorHints
|
operator.Source§impl BitOrAssign for AnchorHints
impl BitOrAssign for AnchorHints
Source§fn bitor_assign(&mut self, other: AnchorHints)
fn bitor_assign(&mut self, other: AnchorHints)
Adds the set of flags.
Source§impl BitXor for AnchorHints
impl BitXor for AnchorHints
Source§fn bitxor(self, other: AnchorHints) -> AnchorHints
fn bitxor(self, other: AnchorHints) -> AnchorHints
Returns the left flags, but with all the right flags toggled.
Source§type Output = AnchorHints
type Output = AnchorHints
^
operator.Source§impl BitXorAssign for AnchorHints
impl BitXorAssign for AnchorHints
Source§fn bitxor_assign(&mut self, other: AnchorHints)
fn bitxor_assign(&mut self, other: AnchorHints)
Toggles the set of flags.
Source§impl Clone for AnchorHints
impl Clone for AnchorHints
Source§fn clone(&self) -> AnchorHints
fn clone(&self) -> AnchorHints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AnchorHints
impl Debug for AnchorHints
Source§impl Extend<AnchorHints> for AnchorHints
impl Extend<AnchorHints> for AnchorHints
Source§fn extend<T: IntoIterator<Item = AnchorHints>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = AnchorHints>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<AnchorHints> for AnchorHints
impl FromIterator<AnchorHints> for AnchorHints
Source§fn from_iter<T: IntoIterator<Item = AnchorHints>>(iterator: T) -> AnchorHints
fn from_iter<T: IntoIterator<Item = AnchorHints>>(iterator: T) -> AnchorHints
Source§impl<'a> FromValue<'a> for AnchorHints
impl<'a> FromValue<'a> for AnchorHints
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for AnchorHints
impl<'a> FromValueOptional<'a> for AnchorHints
unsafe fn from_value_optional(value: &Value) -> Option<Self>
Source§impl Hash for AnchorHints
impl Hash for AnchorHints
Source§impl LowerHex for AnchorHints
impl LowerHex for AnchorHints
Source§impl Not for AnchorHints
impl Not for AnchorHints
Source§fn not(self) -> AnchorHints
fn not(self) -> AnchorHints
Returns the complement of this set of flags.
Source§type Output = AnchorHints
type Output = AnchorHints
!
operator.Source§impl Octal for AnchorHints
impl Octal for AnchorHints
Source§impl Ord for AnchorHints
impl Ord for AnchorHints
Source§fn cmp(&self, other: &AnchorHints) -> Ordering
fn cmp(&self, other: &AnchorHints) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AnchorHints
impl PartialEq for AnchorHints
Source§impl PartialOrd for AnchorHints
impl PartialOrd for AnchorHints
Source§impl StaticType for AnchorHints
impl StaticType for AnchorHints
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.Source§impl Sub for AnchorHints
impl Sub for AnchorHints
Source§fn sub(self, other: AnchorHints) -> AnchorHints
fn sub(self, other: AnchorHints) -> AnchorHints
Returns the set difference of the two sets of flags.
Source§type Output = AnchorHints
type Output = AnchorHints
-
operator.Source§impl SubAssign for AnchorHints
impl SubAssign for AnchorHints
Source§fn sub_assign(&mut self, other: AnchorHints)
fn sub_assign(&mut self, other: AnchorHints)
Disables all flags enabled in the set.
Source§impl UpperHex for AnchorHints
impl UpperHex for AnchorHints
impl Copy for AnchorHints
impl Eq for AnchorHints
impl StructuralPartialEq for AnchorHints
Auto Trait Implementations§
impl Freeze for AnchorHints
impl RefUnwindSafe for AnchorHints
impl Send for AnchorHints
impl Sync for AnchorHints
impl Unpin for AnchorHints
impl UnwindSafe for AnchorHints
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.