Struct valence_server::abilities::PlayerAbilitiesFlags
pub struct PlayerAbilitiesFlags(/* private fields */);
Implementations§
§impl PlayerAbilitiesFlags
impl PlayerAbilitiesFlags
pub const fn new() -> PlayerAbilitiesFlags
pub const fn new() -> PlayerAbilitiesFlags
Creates a new default initialized bitfield.
pub const fn from_bits(bits: u8) -> PlayerAbilitiesFlags
pub const fn from_bits(bits: u8) -> PlayerAbilitiesFlags
Convert from bits.
pub const fn invulnerable(&self) -> bool
pub const fn invulnerable(&self) -> bool
Bits: 0..1
pub const fn with_invulnerable(self, value: bool) -> PlayerAbilitiesFlags
pub const fn with_invulnerable(self, value: bool) -> PlayerAbilitiesFlags
Bits: 0..1
pub fn set_invulnerable(&mut self, value: bool)
pub fn set_invulnerable(&mut self, value: bool)
Bits: 0..1
pub const fn with_flying(self, value: bool) -> PlayerAbilitiesFlags
pub const fn with_flying(self, value: bool) -> PlayerAbilitiesFlags
Bits: 1..2
pub fn set_flying(&mut self, value: bool)
pub fn set_flying(&mut self, value: bool)
Bits: 1..2
pub const fn allow_flying(&self) -> bool
pub const fn allow_flying(&self) -> bool
Bits: 2..3
pub const fn with_allow_flying(self, value: bool) -> PlayerAbilitiesFlags
pub const fn with_allow_flying(self, value: bool) -> PlayerAbilitiesFlags
Bits: 2..3
pub fn set_allow_flying(&mut self, value: bool)
pub fn set_allow_flying(&mut self, value: bool)
Bits: 2..3
pub const fn instant_break(&self) -> bool
pub const fn instant_break(&self) -> bool
Bits: 3..4
pub const fn with_instant_break(self, value: bool) -> PlayerAbilitiesFlags
pub const fn with_instant_break(self, value: bool) -> PlayerAbilitiesFlags
Bits: 3..4
pub fn set_instant_break(&mut self, value: bool)
pub fn set_instant_break(&mut self, value: bool)
Bits: 3..4
Trait Implementations§
§impl Clone for PlayerAbilitiesFlags
impl Clone for PlayerAbilitiesFlags
§fn clone(&self) -> PlayerAbilitiesFlags
fn clone(&self) -> PlayerAbilitiesFlags
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 PlayerAbilitiesFlags
impl Component for PlayerAbilitiesFlags
§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 PlayerAbilitiesFlags
impl Debug for PlayerAbilitiesFlags
§impl<'a> Decode<'a> for PlayerAbilitiesFlags
impl<'a> Decode<'a> for PlayerAbilitiesFlags
§impl Default for PlayerAbilitiesFlags
impl Default for PlayerAbilitiesFlags
§fn default() -> PlayerAbilitiesFlags
fn default() -> PlayerAbilitiesFlags
Returns the “default value” for a type. Read more
§impl Encode for PlayerAbilitiesFlags
impl Encode for PlayerAbilitiesFlags
§impl From<PlayerAbilitiesFlags> for u8
impl From<PlayerAbilitiesFlags> for u8
§fn from(v: PlayerAbilitiesFlags) -> u8
fn from(v: PlayerAbilitiesFlags) -> u8
Converts to this type from the input type.
§impl From<u8> for PlayerAbilitiesFlags
impl From<u8> for PlayerAbilitiesFlags
§fn from(v: u8) -> PlayerAbilitiesFlags
fn from(v: u8) -> PlayerAbilitiesFlags
Converts to this type from the input type.
§impl PartialEq for PlayerAbilitiesFlags
impl PartialEq for PlayerAbilitiesFlags
impl Copy for PlayerAbilitiesFlags
impl Eq for PlayerAbilitiesFlags
impl StructuralPartialEq for PlayerAbilitiesFlags
Auto Trait Implementations§
impl Freeze for PlayerAbilitiesFlags
impl RefUnwindSafe for PlayerAbilitiesFlags
impl Send for PlayerAbilitiesFlags
impl Sync for PlayerAbilitiesFlags
impl Unpin for PlayerAbilitiesFlags
impl UnwindSafe for PlayerAbilitiesFlags
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
].