pub struct LogLevelFlags { /* private fields */ }Implementations§
§impl LogLevelFlags
impl LogLevelFlags
pub const FLAG_RECURSION: LogLevelFlags = Self{ bits: ffi::G_LOG_FLAG_RECURSION as _,}
pub const FLAG_FATAL: LogLevelFlags = Self{ bits: ffi::G_LOG_FLAG_FATAL as _,}
pub const LEVEL_ERROR: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_ERROR as _,}
pub const LEVEL_CRITICAL: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_CRITICAL as _,}
pub const LEVEL_WARNING: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_WARNING as _,}
pub const LEVEL_MESSAGE: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_MESSAGE as _,}
pub const LEVEL_INFO: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_INFO as _,}
pub const LEVEL_DEBUG: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_DEBUG as _,}
pub const LEVEL_MASK: LogLevelFlags = Self{ bits: ffi::G_LOG_LEVEL_MASK as _,}
pub const fn empty() -> LogLevelFlags
pub const fn empty() -> LogLevelFlags
Returns an empty set of flags.
pub const fn all() -> LogLevelFlags
pub const fn all() -> LogLevelFlags
Returns the set containing all flags.
pub const fn from_bits(bits: u32) -> Option<LogLevelFlags>
pub const fn from_bits(bits: u32) -> Option<LogLevelFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> LogLevelFlags
pub const fn from_bits_truncate(bits: u32) -> LogLevelFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> LogLevelFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> LogLevelFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags! macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked() has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
pub const fn intersects(&self, other: LogLevelFlags) -> bool
pub const fn intersects(&self, other: LogLevelFlags) -> bool
Returns true if there are flags common to both self and other.
pub const fn contains(&self, other: LogLevelFlags) -> bool
pub const fn contains(&self, other: LogLevelFlags) -> bool
Returns true if all of the flags in other are contained within self.
pub fn insert(&mut self, other: LogLevelFlags)
pub fn insert(&mut self, other: LogLevelFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: LogLevelFlags)
pub fn remove(&mut self, other: LogLevelFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: LogLevelFlags)
pub fn toggle(&mut self, other: LogLevelFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: LogLevelFlags, value: bool)
pub fn set(&mut self, other: LogLevelFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
pub const fn intersection(self, other: LogLevelFlags) -> LogLevelFlags
pub const fn intersection(self, other: LogLevelFlags) -> LogLevelFlags
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
pub const fn union(self, other: LogLevelFlags) -> LogLevelFlags
pub const fn union(self, other: LogLevelFlags) -> LogLevelFlags
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both (see Self::symmetric_difference if that
is undesirable).
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
pub const fn difference(self, other: LogLevelFlags) -> LogLevelFlags
pub const fn difference(self, other: LogLevelFlags) -> LogLevelFlags
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
pub const fn symmetric_difference(self, other: LogLevelFlags) -> LogLevelFlags
pub const fn symmetric_difference(self, other: LogLevelFlags) -> LogLevelFlags
Returns the symmetric difference between the flags
in self and other.
Specifically, the returned set contains the flags present which
are present in self or other, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self and other.
This is equivalent to using the ^ operator (e.g.
ops::BitXor), as in flags ^ other.
pub const fn complement(self) -> LogLevelFlags
pub const fn complement(self) -> LogLevelFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all() and self (e.g. Self::all() - self)
This is equivalent to using the ! operator (e.g.
ops::Not), as in !flags.
Trait Implementations§
§impl Binary for LogLevelFlags
impl Binary for LogLevelFlags
§impl BitAnd<LogLevelFlags> for LogLevelFlags
impl BitAnd<LogLevelFlags> for LogLevelFlags
§fn bitand(self, other: LogLevelFlags) -> LogLevelFlags
fn bitand(self, other: LogLevelFlags) -> LogLevelFlags
Returns the intersection between the two sets of flags.
§type Output = LogLevelFlags
type Output = LogLevelFlags
& operator.§impl BitAndAssign<LogLevelFlags> for LogLevelFlags
impl BitAndAssign<LogLevelFlags> for LogLevelFlags
§fn bitand_assign(&mut self, other: LogLevelFlags)
fn bitand_assign(&mut self, other: LogLevelFlags)
Disables all flags disabled in the set.
§impl BitOr<LogLevelFlags> for LogLevelFlags
impl BitOr<LogLevelFlags> for LogLevelFlags
§fn bitor(self, other: LogLevelFlags) -> LogLevelFlags
fn bitor(self, other: LogLevelFlags) -> LogLevelFlags
Returns the union of the two sets of flags.
§type Output = LogLevelFlags
type Output = LogLevelFlags
| operator.§impl BitOrAssign<LogLevelFlags> for LogLevelFlags
impl BitOrAssign<LogLevelFlags> for LogLevelFlags
§fn bitor_assign(&mut self, other: LogLevelFlags)
fn bitor_assign(&mut self, other: LogLevelFlags)
Adds the set of flags.
§impl BitXor<LogLevelFlags> for LogLevelFlags
impl BitXor<LogLevelFlags> for LogLevelFlags
§fn bitxor(self, other: LogLevelFlags) -> LogLevelFlags
fn bitxor(self, other: LogLevelFlags) -> LogLevelFlags
Returns the left flags, but with all the right flags toggled.
§type Output = LogLevelFlags
type Output = LogLevelFlags
^ operator.§impl BitXorAssign<LogLevelFlags> for LogLevelFlags
impl BitXorAssign<LogLevelFlags> for LogLevelFlags
§fn bitxor_assign(&mut self, other: LogLevelFlags)
fn bitxor_assign(&mut self, other: LogLevelFlags)
Toggles the set of flags.
§impl Clone for LogLevelFlags
impl Clone for LogLevelFlags
§fn clone(&self) -> LogLevelFlags
fn clone(&self) -> LogLevelFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for LogLevelFlags
impl Debug for LogLevelFlags
§impl Display for LogLevelFlags
impl Display for LogLevelFlags
§impl Extend<LogLevelFlags> for LogLevelFlags
impl Extend<LogLevelFlags> for LogLevelFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = LogLevelFlags>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = LogLevelFlags>,
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)§impl FromIterator<LogLevelFlags> for LogLevelFlags
impl FromIterator<LogLevelFlags> for LogLevelFlags
§fn from_iter<T>(iterator: T) -> LogLevelFlagswhere
T: IntoIterator<Item = LogLevelFlags>,
fn from_iter<T>(iterator: T) -> LogLevelFlagswhere T: IntoIterator<Item = LogLevelFlags>,
§impl Hash for LogLevelFlags
impl Hash for LogLevelFlags
§impl LowerHex for LogLevelFlags
impl LowerHex for LogLevelFlags
§impl Not for LogLevelFlags
impl Not for LogLevelFlags
§fn not(self) -> LogLevelFlags
fn not(self) -> LogLevelFlags
Returns the complement of this set of flags.
§type Output = LogLevelFlags
type Output = LogLevelFlags
! operator.§impl Octal for LogLevelFlags
impl Octal for LogLevelFlags
§impl Ord for LogLevelFlags
impl Ord for LogLevelFlags
§impl PartialEq<LogLevelFlags> for LogLevelFlags
impl PartialEq<LogLevelFlags> for LogLevelFlags
§fn eq(&self, other: &LogLevelFlags) -> bool
fn eq(&self, other: &LogLevelFlags) -> bool
self and other values to be equal, and is used
by ==.§impl PartialOrd<LogLevelFlags> for LogLevelFlags
impl PartialOrd<LogLevelFlags> for LogLevelFlags
§fn partial_cmp(&self, other: &LogLevelFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &LogLevelFlags) -> 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 more§impl Sub<LogLevelFlags> for LogLevelFlags
impl Sub<LogLevelFlags> for LogLevelFlags
§fn sub(self, other: LogLevelFlags) -> LogLevelFlags
fn sub(self, other: LogLevelFlags) -> LogLevelFlags
Returns the set difference of the two sets of flags.
§type Output = LogLevelFlags
type Output = LogLevelFlags
- operator.§impl SubAssign<LogLevelFlags> for LogLevelFlags
impl SubAssign<LogLevelFlags> for LogLevelFlags
§fn sub_assign(&mut self, other: LogLevelFlags)
fn sub_assign(&mut self, other: LogLevelFlags)
Disables all flags enabled in the set.