#[non_exhaustive]pub enum BlockEntity {
Nbt {
action: u8,
nbt: Bytes,
},
Sign([Box<str>; 4]),
}Expand description
A block entity’s data as the server sent it.
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.
Nbt
Raw NBT compound (a private copy, never a view into a packet buffer). action is the
tile_entity_data action (1.8: 1 spawner, 2 command block, 3 beacon, 4 skull, 5 flower
pot, 6 banner; 1.16 adds 7..15, 9 = sign), or 0 for the block entity list of a 1.16 chunk.
Sign([Box<str>; 4])
1.8 update_sign: the four lines as raw chat JSON.
Trait Implementations§
Source§impl Clone for BlockEntity
impl Clone for BlockEntity
Source§impl Debug for BlockEntity
impl Debug for BlockEntity
impl Eq for BlockEntity
Source§impl PartialEq for BlockEntity
impl PartialEq for BlockEntity
impl StructuralPartialEq for BlockEntity
Auto Trait Implementations§
impl !Freeze for BlockEntity
impl Forget for BlockEntity
impl Move for BlockEntity
impl RefUnwindSafe for BlockEntity
impl Send for BlockEntity
impl Sync for BlockEntity
impl Unpin for BlockEntity
impl UnsafeUnpin for BlockEntitywhere
*const u8: UnsafeUnpin,
Align8<*mut ()>: UnsafeUnpin,
&'static Vtable: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<str>: UnsafeUnpin,
impl UnwindSafe for BlockEntitywhere
*const u8: UnwindSafe,
Align8<*mut ()>: UnwindSafe,
&'static Vtable: UnwindSafe,
BoxRaw<str>: UnwindSafe,
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