Struct sdl2::messagebox::MessageBoxFlag
source · pub struct MessageBoxFlag { /* private fields */ }
Implementations§
source§impl MessageBoxFlag
impl MessageBoxFlag
pub const ERROR: MessageBoxFlag = _
pub const WARNING: MessageBoxFlag = _
pub const INFORMATION: MessageBoxFlag = _
sourcepub const fn empty() -> MessageBoxFlag
pub const fn empty() -> MessageBoxFlag
Returns an empty set of flags
sourcepub const fn all() -> MessageBoxFlag
pub const fn all() -> MessageBoxFlag
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<MessageBoxFlag>
pub fn from_bits(bits: u32) -> Option<MessageBoxFlag>
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) -> MessageBoxFlag
pub const fn from_bits_truncate(bits: u32) -> MessageBoxFlag
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> MessageBoxFlag
pub const unsafe fn from_bits_unchecked(bits: u32) -> MessageBoxFlag
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: MessageBoxFlag) -> bool
pub const fn intersects(&self, other: MessageBoxFlag) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: MessageBoxFlag) -> bool
pub const fn contains(&self, other: MessageBoxFlag) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: MessageBoxFlag)
pub fn insert(&mut self, other: MessageBoxFlag)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: MessageBoxFlag)
pub fn remove(&mut self, other: MessageBoxFlag)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: MessageBoxFlag)
pub fn toggle(&mut self, other: MessageBoxFlag)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: MessageBoxFlag, value: bool)
pub fn set(&mut self, other: MessageBoxFlag, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
source§impl Binary for MessageBoxFlag
impl Binary for MessageBoxFlag
source§impl BitAnd for MessageBoxFlag
impl BitAnd for MessageBoxFlag
source§fn bitand(self, other: MessageBoxFlag) -> MessageBoxFlag
fn bitand(self, other: MessageBoxFlag) -> MessageBoxFlag
Returns the intersection between the two sets of flags.
§type Output = MessageBoxFlag
type Output = MessageBoxFlag
&
operator.source§impl BitAndAssign for MessageBoxFlag
impl BitAndAssign for MessageBoxFlag
source§fn bitand_assign(&mut self, other: MessageBoxFlag)
fn bitand_assign(&mut self, other: MessageBoxFlag)
Disables all flags disabled in the set.
source§impl BitOr for MessageBoxFlag
impl BitOr for MessageBoxFlag
source§fn bitor(self, other: MessageBoxFlag) -> MessageBoxFlag
fn bitor(self, other: MessageBoxFlag) -> MessageBoxFlag
Returns the union of the two sets of flags.
§type Output = MessageBoxFlag
type Output = MessageBoxFlag
|
operator.source§impl BitOrAssign for MessageBoxFlag
impl BitOrAssign for MessageBoxFlag
source§fn bitor_assign(&mut self, other: MessageBoxFlag)
fn bitor_assign(&mut self, other: MessageBoxFlag)
Adds the set of flags.
source§impl BitXor for MessageBoxFlag
impl BitXor for MessageBoxFlag
source§fn bitxor(self, other: MessageBoxFlag) -> MessageBoxFlag
fn bitxor(self, other: MessageBoxFlag) -> MessageBoxFlag
Returns the left flags, but with all the right flags toggled.
§type Output = MessageBoxFlag
type Output = MessageBoxFlag
^
operator.source§impl BitXorAssign for MessageBoxFlag
impl BitXorAssign for MessageBoxFlag
source§fn bitxor_assign(&mut self, other: MessageBoxFlag)
fn bitxor_assign(&mut self, other: MessageBoxFlag)
Toggles the set of flags.
source§impl Clone for MessageBoxFlag
impl Clone for MessageBoxFlag
source§fn clone(&self) -> MessageBoxFlag
fn clone(&self) -> MessageBoxFlag
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MessageBoxFlag
impl Debug for MessageBoxFlag
source§impl Extend<MessageBoxFlag> for MessageBoxFlag
impl Extend<MessageBoxFlag> for MessageBoxFlag
source§fn extend<T: IntoIterator<Item = MessageBoxFlag>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = MessageBoxFlag>>(&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<MessageBoxFlag> for MessageBoxFlag
impl FromIterator<MessageBoxFlag> for MessageBoxFlag
source§fn from_iter<T: IntoIterator<Item = MessageBoxFlag>>(
iterator: T
) -> MessageBoxFlag
fn from_iter<T: IntoIterator<Item = MessageBoxFlag>>( iterator: T ) -> MessageBoxFlag
source§impl Hash for MessageBoxFlag
impl Hash for MessageBoxFlag
source§impl LowerHex for MessageBoxFlag
impl LowerHex for MessageBoxFlag
source§impl Not for MessageBoxFlag
impl Not for MessageBoxFlag
source§fn not(self) -> MessageBoxFlag
fn not(self) -> MessageBoxFlag
Returns the complement of this set of flags.
§type Output = MessageBoxFlag
type Output = MessageBoxFlag
!
operator.source§impl Octal for MessageBoxFlag
impl Octal for MessageBoxFlag
source§impl Ord for MessageBoxFlag
impl Ord for MessageBoxFlag
source§fn cmp(&self, other: &MessageBoxFlag) -> Ordering
fn cmp(&self, other: &MessageBoxFlag) -> 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 MessageBoxFlag
impl PartialEq for MessageBoxFlag
source§fn eq(&self, other: &MessageBoxFlag) -> bool
fn eq(&self, other: &MessageBoxFlag) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MessageBoxFlag
impl PartialOrd for MessageBoxFlag
source§fn partial_cmp(&self, other: &MessageBoxFlag) -> Option<Ordering>
fn partial_cmp(&self, other: &MessageBoxFlag) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub for MessageBoxFlag
impl Sub for MessageBoxFlag
source§fn sub(self, other: MessageBoxFlag) -> MessageBoxFlag
fn sub(self, other: MessageBoxFlag) -> MessageBoxFlag
Returns the set difference of the two sets of flags.
§type Output = MessageBoxFlag
type Output = MessageBoxFlag
-
operator.source§impl SubAssign for MessageBoxFlag
impl SubAssign for MessageBoxFlag
source§fn sub_assign(&mut self, other: MessageBoxFlag)
fn sub_assign(&mut self, other: MessageBoxFlag)
Disables all flags enabled in the set.