pub struct PersistentAbilities {
pub invulnerable: bool,
pub flying: bool,
pub may_fly: bool,
pub instabuild: bool,
pub may_build: bool,
pub flying_speed: f32,
pub walking_speed: f32,
}Expand description
Persistent abilities data.
Fields§
§invulnerable: boolWhether the player is invulnerable to damage.
flying: boolWhether the player is currently flying.
may_fly: boolWhether the player is allowed to fly.
instabuild: boolWhether the player can instantly break blocks (creative mode).
may_build: boolWhether the player can place/break blocks.
flying_speed: f32Flying speed (default 0.05).
walking_speed: f32Walking speed (default 0.1).
Trait Implementations§
Source§impl Clone for PersistentAbilities
impl Clone for PersistentAbilities
Source§fn clone(&self) -> PersistentAbilities
fn clone(&self) -> PersistentAbilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistentAbilities
impl Debug for PersistentAbilities
Source§impl Default for PersistentAbilities
impl Default for PersistentAbilities
Source§impl From<&Abilities> for PersistentAbilities
impl From<&Abilities> for PersistentAbilities
Source§impl From<PersistentAbilities> for Abilities
impl From<PersistentAbilities> for Abilities
Source§fn from(persistent: PersistentAbilities) -> Self
fn from(persistent: PersistentAbilities) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PersistentAbilities
impl RefUnwindSafe for PersistentAbilities
impl Send for PersistentAbilities
impl Sync for PersistentAbilities
impl Unpin for PersistentAbilities
impl UnsafeUnpin for PersistentAbilities
impl UnwindSafe for PersistentAbilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>