pub struct Equippable {
pub slot: EquippableSlot,
}Expand description
The equippable component data.
Fields§
§slot: EquippableSlotTrait Implementations§
Source§impl Clone for Equippable
impl Clone for Equippable
Source§fn clone(&self) -> Equippable
fn clone(&self) -> Equippable
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 Component for Equippable
impl Component for Equippable
Source§fn into_data(self) -> ComponentData
fn into_data(self) -> ComponentData
Converts this component value into
ComponentData.Source§fn from_data(data: ComponentData) -> Option<Self>
fn from_data(data: ComponentData) -> Option<Self>
Attempts to extract this component type from
ComponentData.
Returns None if the data is a different variant.Source§fn from_data_ref(data: &ComponentData) -> Option<&Self>
fn from_data_ref(data: &ComponentData) -> Option<&Self>
Attempts to get a reference to this component type from
ComponentData.
Returns None if the data is a different variant or if the type
cannot be referenced directly (e.g., needs conversion).Source§impl Debug for Equippable
impl Debug for Equippable
Source§impl FromNbtTag for Equippable
impl FromNbtTag for Equippable
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl HashComponent for Equippable
impl HashComponent for Equippable
Source§fn hash_component(&self, hasher: &mut ComponentHasher)
fn hash_component(&self, hasher: &mut ComponentHasher)
Hashes this value into the given hasher.
Source§fn compute_hash(&self) -> i32
fn compute_hash(&self) -> i32
Computes the hash of this value.
Source§impl PartialEq for Equippable
impl PartialEq for Equippable
Source§fn eq(&self, other: &Equippable) -> bool
fn eq(&self, other: &Equippable) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl ReadFrom for Equippable
impl ReadFrom for Equippable
impl StructuralPartialEq for Equippable
Source§impl ToNbtTag for Equippable
impl ToNbtTag for Equippable
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
Auto Trait Implementations§
impl Freeze for Equippable
impl RefUnwindSafe for Equippable
impl Send for Equippable
impl Sync for Equippable
impl Unpin for Equippable
impl UnsafeUnpin for Equippable
impl UnwindSafe for Equippable
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