pub(super) struct LeashData {
pub(super) attachment: LeashAttachment,
pub(super) holder: Option<WeakEntity>,
pub(super) angular_momentum: f64,
}Fields§
§attachment: LeashAttachment§holder: Option<WeakEntity>§angular_momentum: f64Implementations§
Source§impl LeashData
impl LeashData
pub(super) fn from_entity(holder: &SharedEntity) -> Self
pub(super) const fn from_delayed_attachment(attachment: LeashAttachment) -> Self
pub(super) fn holder(&self) -> Option<SharedEntity>
pub(super) fn saved_attachment(&self) -> LeashAttachment
pub(super) fn set_holder(&mut self, holder: &SharedEntity)
pub(super) fn save(&self, nbt: &mut NbtCompound)
pub(super) fn load(nbt: BorrowedNbtCompoundView<'_, '_>) -> Option<Self>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LeashData
impl !UnwindSafe for LeashData
impl Freeze for LeashData
impl Send for LeashData
impl Sync for LeashData
impl Unpin for LeashData
impl UnsafeUnpin for LeashData
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<>>