Enum AttachmentHolder
#[non_exhaustive]pub enum AttachmentHolder {
Entity(EntityRef),
Player(PlayerRef),
BlockEntity(BlockEntityRef),
Chunk(ChunkRef),
Level(LevelRef),
}Expand description
A holder’s existing scoped handle, without retaining or loading the holder.
Unlike crate::Holder, these identities are not relative to whichever level a
host currently has in place. Keep the ordinary handle rules when using a retained
identity: a removed entity, unloaded chunk or closed world may no longer resolve.
Copying the identity never extends the holder’s lifetime.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Entity(EntityRef)
An entity’s attachment holder.
Player(PlayerRef)
A player, keeping both their UUID and their existing entity handle.
BlockEntity(BlockEntityRef)
A block entity in its level.
Chunk(ChunkRef)
A chunk in its level.
Level(LevelRef)
A level of the open world.
Trait Implementations§
§impl Clone for AttachmentHolder
impl Clone for AttachmentHolder
§fn clone(&self) -> AttachmentHolder
fn clone(&self) -> AttachmentHolder
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 moreimpl Copy for AttachmentHolder
§impl Debug for AttachmentHolder
impl Debug for AttachmentHolder
impl Eq for AttachmentHolder
§impl Hash for AttachmentHolder
impl Hash for AttachmentHolder
§impl PartialEq for AttachmentHolder
impl PartialEq for AttachmentHolder
impl StructuralPartialEq for AttachmentHolder
Auto Trait Implementations§
impl Freeze for AttachmentHolder
impl RefUnwindSafe for AttachmentHolder
impl Send for AttachmentHolder
impl Sync for AttachmentHolder
impl Unpin for AttachmentHolder
impl UnsafeUnpin for AttachmentHolder
impl UnwindSafe for AttachmentHolder
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