Struct valence_boss_bar::BossBarFlags
pub struct BossBarFlags(/* private fields */);
Expand description
The flags of a boss bar (darken sky, dragon bar, create fog).
Implementations§
§impl BossBarFlags
impl BossBarFlags
pub const fn new() -> BossBarFlags
pub const fn new() -> BossBarFlags
Creates a new default initialized bitfield.
pub const fn from_bits(bits: u8) -> BossBarFlags
pub const fn from_bits(bits: u8) -> BossBarFlags
Convert from bits.
pub const fn darken_sky(&self) -> bool
pub const fn darken_sky(&self) -> bool
Bits: 0..1
pub const fn with_darken_sky(self, value: bool) -> BossBarFlags
pub const fn with_darken_sky(self, value: bool) -> BossBarFlags
Bits: 0..1
pub fn set_darken_sky(&mut self, value: bool)
pub fn set_darken_sky(&mut self, value: bool)
Bits: 0..1
pub const fn dragon_bar(&self) -> bool
pub const fn dragon_bar(&self) -> bool
Bits: 1..2
pub const fn with_dragon_bar(self, value: bool) -> BossBarFlags
pub const fn with_dragon_bar(self, value: bool) -> BossBarFlags
Bits: 1..2
pub fn set_dragon_bar(&mut self, value: bool)
pub fn set_dragon_bar(&mut self, value: bool)
Bits: 1..2
pub const fn create_fog(&self) -> bool
pub const fn create_fog(&self) -> bool
Bits: 2..3
pub const fn with_create_fog(self, value: bool) -> BossBarFlags
pub const fn with_create_fog(self, value: bool) -> BossBarFlags
Bits: 2..3
pub fn set_create_fog(&mut self, value: bool)
pub fn set_create_fog(&mut self, value: bool)
Bits: 2..3
Trait Implementations§
§impl Clone for BossBarFlags
impl Clone for BossBarFlags
§fn clone(&self) -> BossBarFlags
fn clone(&self) -> BossBarFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Component for BossBarFlags
impl Component for BossBarFlags
§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
§fn register_component_hooks(_hooks: &mut ComponentHooks)
fn register_component_hooks(_hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its [
ComponentHooks
].§impl Debug for BossBarFlags
impl Debug for BossBarFlags
§impl<'a> Decode<'a> for BossBarFlags
impl<'a> Decode<'a> for BossBarFlags
§impl Default for BossBarFlags
impl Default for BossBarFlags
§fn default() -> BossBarFlags
fn default() -> BossBarFlags
Returns the “default value” for a type. Read more
§impl Encode for BossBarFlags
impl Encode for BossBarFlags
§impl From<BossBarFlags> for u8
impl From<BossBarFlags> for u8
§fn from(v: BossBarFlags) -> u8
fn from(v: BossBarFlags) -> u8
Converts to this type from the input type.
§impl From<u8> for BossBarFlags
impl From<u8> for BossBarFlags
§fn from(v: u8) -> BossBarFlags
fn from(v: u8) -> BossBarFlags
Converts to this type from the input type.
§impl PartialEq for BossBarFlags
impl PartialEq for BossBarFlags
impl Copy for BossBarFlags
impl Eq for BossBarFlags
impl StructuralPartialEq for BossBarFlags
Auto Trait Implementations§
impl Freeze for BossBarFlags
impl RefUnwindSafe for BossBarFlags
impl Send for BossBarFlags
impl Sync for BossBarFlags
impl Unpin for BossBarFlags
impl UnwindSafe for BossBarFlags
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
Mutably borrows from an owned value. Read more
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Gets this [
Bundle
]’s component ids. This will be None
if the component has not been registered.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].