Enum DisplayKind
#[non_exhaustive]pub enum DisplayKind {
Block,
Item,
Text,
}Expand description
Which Display subclass an entity is.
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.
Implementations§
§impl DisplayKind
impl DisplayKind
pub fn entity_type(self) -> &'static str
pub fn entity_type(self) -> &'static str
The entity type id: minecraft:block_display, minecraft:item_display or minecraft:text_display.
pub fn from_entity_type(id: &str) -> Option<DisplayKind>
pub fn from_entity_type(id: &str) -> Option<DisplayKind>
The kind of an entity type id, or None for another entity type.
Trait Implementations§
§impl Clone for DisplayKind
impl Clone for DisplayKind
§fn clone(&self) -> DisplayKind
fn clone(&self) -> DisplayKind
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 DisplayKind
§impl Debug for DisplayKind
impl Debug for DisplayKind
impl Eq for DisplayKind
§impl Hash for DisplayKind
impl Hash for DisplayKind
§impl PartialEq for DisplayKind
impl PartialEq for DisplayKind
impl StructuralPartialEq for DisplayKind
Auto Trait Implementations§
impl Freeze for DisplayKind
impl RefUnwindSafe for DisplayKind
impl Send for DisplayKind
impl Sync for DisplayKind
impl Unpin for DisplayKind
impl UnsafeUnpin for DisplayKind
impl UnwindSafe for DisplayKind
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