Struct RuntimeEventMask
pub struct RuntimeEventMask(/* private fields */);Expand description
Event types a map or a runtime queues.
Each bit is 1 << RuntimeEventType::raw_value, so a bit derived from a
decoded event type matches the constant that names it. A map reads the
bits in ALL_MAP_EVENTS and a runtime reads the bits in
ALL_RUNTIME_EVENTS, so both accept ALL.
Implementations§
§impl RuntimeEventMask
impl RuntimeEventMask
pub const NONE: RuntimeEventMask
pub const NONE: RuntimeEventMask
Selects no event type.
pub const MAP_CAMERA_WILL_CHANGE: RuntimeEventMask
pub const MAP_CAMERA_IS_CHANGING: RuntimeEventMask
pub const MAP_CAMERA_DID_CHANGE: RuntimeEventMask
pub const MAP_CAMERA_TRANSITION_FINISHED: RuntimeEventMask
pub const MAP_STYLE_LOADED: RuntimeEventMask
pub const MAP_LOADING_STARTED: RuntimeEventMask
pub const MAP_LOADING_FINISHED: RuntimeEventMask
pub const MAP_LOADING_FAILED: RuntimeEventMask
pub const MAP_IDLE: RuntimeEventMask
pub const MAP_RENDER_UPDATE_AVAILABLE: RuntimeEventMask
pub const MAP_RENDER_ERROR: RuntimeEventMask
pub const MAP_STILL_IMAGE_FINISHED: RuntimeEventMask
pub const MAP_STILL_IMAGE_FAILED: RuntimeEventMask
pub const MAP_RENDER_FRAME_STARTED: RuntimeEventMask
pub const MAP_RENDER_FRAME_FINISHED: RuntimeEventMask
pub const MAP_RENDER_MAP_STARTED: RuntimeEventMask
pub const MAP_RENDER_MAP_FINISHED: RuntimeEventMask
pub const MAP_STYLE_IMAGE_MISSING: RuntimeEventMask
pub const MAP_TILE_ACTION: RuntimeEventMask
pub const OFFLINE_REGION_STATUS_CHANGED: RuntimeEventMask
pub const OFFLINE_REGION_RESPONSE_ERROR: RuntimeEventMask
pub const OFFLINE_REGION_TILE_COUNT_LIMIT_EXCEEDED: RuntimeEventMask
pub const OFFLINE_OPERATION_COMPLETED: RuntimeEventMask
pub const ALL_MAP_EVENTS: RuntimeEventMask
pub const ALL_MAP_EVENTS: RuntimeEventMask
Selects every map-originated event type this version defines.
pub const ALL_RUNTIME_EVENTS: RuntimeEventMask
pub const ALL_RUNTIME_EVENTS: RuntimeEventMask
Selects every runtime-originated event type this version defines.
pub const ALL: RuntimeEventMask
pub const ALL: RuntimeEventMask
Selects every event type this version defines.
§impl RuntimeEventMask
impl RuntimeEventMask
pub const fn empty() -> RuntimeEventMask
pub const fn empty() -> RuntimeEventMask
Get a flags value with all bits unset.
pub const fn all() -> RuntimeEventMask
pub const fn all() -> RuntimeEventMask
Get a flags value with all known bits set.
pub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u64) -> Option<RuntimeEventMask>
pub const fn from_bits(bits: u64) -> Option<RuntimeEventMask>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u64) -> RuntimeEventMask
pub const fn from_bits_truncate(bits: u64) -> RuntimeEventMask
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u64) -> RuntimeEventMask
pub const fn from_bits_retain(bits: u64) -> RuntimeEventMask
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<RuntimeEventMask>
pub fn from_name(name: &str) -> Option<RuntimeEventMask>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: RuntimeEventMask) -> bool
pub const fn intersects(&self, other: RuntimeEventMask) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: RuntimeEventMask) -> bool
pub const fn contains(&self, other: RuntimeEventMask) -> bool
Whether all set bits in other are also set in self.
pub fn insert(&mut self, other: RuntimeEventMask)
pub fn insert(&mut self, other: RuntimeEventMask)
The bitwise or (|) of the bits in self and other.
pub fn remove(&mut self, other: RuntimeEventMask)
pub fn remove(&mut self, other: RuntimeEventMask)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: RuntimeEventMask)
pub fn toggle(&mut self, other: RuntimeEventMask)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: RuntimeEventMask, value: bool)
pub fn set(&mut self, other: RuntimeEventMask, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: RuntimeEventMask) -> RuntimeEventMask
pub const fn intersection(self, other: RuntimeEventMask) -> RuntimeEventMask
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: RuntimeEventMask) -> RuntimeEventMask
pub const fn union(self, other: RuntimeEventMask) -> RuntimeEventMask
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: RuntimeEventMask) -> RuntimeEventMask
pub const fn difference(self, other: RuntimeEventMask) -> RuntimeEventMask
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(
self,
other: RuntimeEventMask,
) -> RuntimeEventMask
pub const fn symmetric_difference( self, other: RuntimeEventMask, ) -> RuntimeEventMask
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> RuntimeEventMask
pub const fn complement(self) -> RuntimeEventMask
The bitwise negation (!) of the bits in self, truncating the result.
§impl RuntimeEventMask
impl RuntimeEventMask
pub const fn iter(&self) -> Iter<RuntimeEventMask>
pub const fn iter(&self) -> Iter<RuntimeEventMask>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<RuntimeEventMask>
pub const fn iter_names(&self) -> IterNames<RuntimeEventMask>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for RuntimeEventMask
impl Binary for RuntimeEventMask
§impl BitAnd for RuntimeEventMask
impl BitAnd for RuntimeEventMask
§fn bitand(self, other: RuntimeEventMask) -> RuntimeEventMask
fn bitand(self, other: RuntimeEventMask) -> RuntimeEventMask
The bitwise and (&) of the bits in self and other.
§type Output = RuntimeEventMask
type Output = RuntimeEventMask
& operator.§impl BitAndAssign for RuntimeEventMask
impl BitAndAssign for RuntimeEventMask
§fn bitand_assign(&mut self, other: RuntimeEventMask)
fn bitand_assign(&mut self, other: RuntimeEventMask)
The bitwise and (&) of the bits in self and other.
§impl BitOr for RuntimeEventMask
impl BitOr for RuntimeEventMask
§fn bitor(self, other: RuntimeEventMask) -> RuntimeEventMask
fn bitor(self, other: RuntimeEventMask) -> RuntimeEventMask
The bitwise or (|) of the bits in self and other.
§type Output = RuntimeEventMask
type Output = RuntimeEventMask
| operator.§impl BitOrAssign for RuntimeEventMask
impl BitOrAssign for RuntimeEventMask
§fn bitor_assign(&mut self, other: RuntimeEventMask)
fn bitor_assign(&mut self, other: RuntimeEventMask)
The bitwise or (|) of the bits in self and other.
§impl BitXor for RuntimeEventMask
impl BitXor for RuntimeEventMask
§fn bitxor(self, other: RuntimeEventMask) -> RuntimeEventMask
fn bitxor(self, other: RuntimeEventMask) -> RuntimeEventMask
The bitwise exclusive-or (^) of the bits in self and other.
§type Output = RuntimeEventMask
type Output = RuntimeEventMask
^ operator.§impl BitXorAssign for RuntimeEventMask
impl BitXorAssign for RuntimeEventMask
§fn bitxor_assign(&mut self, other: RuntimeEventMask)
fn bitxor_assign(&mut self, other: RuntimeEventMask)
The bitwise exclusive-or (^) of the bits in self and other.
§impl Clone for RuntimeEventMask
impl Clone for RuntimeEventMask
§fn clone(&self) -> RuntimeEventMask
fn clone(&self) -> RuntimeEventMask
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for RuntimeEventMask
impl Debug for RuntimeEventMask
§impl Extend<RuntimeEventMask> for RuntimeEventMask
impl Extend<RuntimeEventMask> for RuntimeEventMask
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = RuntimeEventMask>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = RuntimeEventMask>,
The bitwise or (|) of the bits in each flags value.
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 Flags for RuntimeEventMask
impl Flags for RuntimeEventMask
§const FLAGS: &'static [Flag<RuntimeEventMask>]
const FLAGS: &'static [Flag<RuntimeEventMask>]
§fn from_bits_retain(bits: u64) -> RuntimeEventMask
fn from_bits_retain(bits: u64) -> RuntimeEventMask
§fn all_named() -> RuntimeEventMask
fn all_named() -> RuntimeEventMask
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS].§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.§impl FromIterator<RuntimeEventMask> for RuntimeEventMask
impl FromIterator<RuntimeEventMask> for RuntimeEventMask
§fn from_iter<T>(iterator: T) -> RuntimeEventMaskwhere
T: IntoIterator<Item = RuntimeEventMask>,
fn from_iter<T>(iterator: T) -> RuntimeEventMaskwhere
T: IntoIterator<Item = RuntimeEventMask>,
The bitwise or (|) of the bits in each flags value.
§impl Hash for RuntimeEventMask
impl Hash for RuntimeEventMask
§impl IntoIterator for RuntimeEventMask
impl IntoIterator for RuntimeEventMask
§type Item = RuntimeEventMask
type Item = RuntimeEventMask
§type IntoIter = Iter<RuntimeEventMask>
type IntoIter = Iter<RuntimeEventMask>
§fn into_iter(self) -> <RuntimeEventMask as IntoIterator>::IntoIter
fn into_iter(self) -> <RuntimeEventMask as IntoIterator>::IntoIter
§impl LowerHex for RuntimeEventMask
impl LowerHex for RuntimeEventMask
§impl Not for RuntimeEventMask
impl Not for RuntimeEventMask
§fn not(self) -> RuntimeEventMask
fn not(self) -> RuntimeEventMask
The bitwise negation (!) of the bits in self, truncating the result.
§type Output = RuntimeEventMask
type Output = RuntimeEventMask
! operator.§impl Octal for RuntimeEventMask
impl Octal for RuntimeEventMask
§impl PartialEq for RuntimeEventMask
impl PartialEq for RuntimeEventMask
§impl Sub for RuntimeEventMask
impl Sub for RuntimeEventMask
§fn sub(self, other: RuntimeEventMask) -> RuntimeEventMask
fn sub(self, other: RuntimeEventMask) -> RuntimeEventMask
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = RuntimeEventMask
type Output = RuntimeEventMask
- operator.§impl SubAssign for RuntimeEventMask
impl SubAssign for RuntimeEventMask
§fn sub_assign(&mut self, other: RuntimeEventMask)
fn sub_assign(&mut self, other: RuntimeEventMask)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.