Enum ItemDisplayContext
#[non_exhaustive]pub enum ItemDisplayContext {
None,
ThirdPersonLeftHand,
ThirdPersonRightHand,
FirstPersonLeftHand,
FirstPersonRightHand,
Head,
Gui,
Ground,
Fixed,
OnShelf,
}Expand description
ItemDisplayContext.
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.
None
No transform; the model as authored.
ThirdPersonLeftHand
Held in the left hand, seen from outside.
ThirdPersonRightHand
Held in the right hand, seen from outside.
FirstPersonLeftHand
Held in the left hand, seen by its owner.
FirstPersonRightHand
Held in the right hand, seen by its owner.
Head
Worn on the head.
Gui
Drawn in an inventory slot.
Ground
Dropped as an item entity.
Fixed
Hung in an item frame.
OnShelf
Standing on a shelf.
Implementations§
§impl ItemDisplayContext
impl ItemDisplayContext
pub const ALL: [ItemDisplayContext; 10]
pub const ALL: [ItemDisplayContext; 10]
Every context, in ordinal order (vanilla’s id is the index).
pub fn from_name(name: &str) -> Option<ItemDisplayContext>
pub fn from_name(name: &str) -> Option<ItemDisplayContext>
The context with that name, or None for one vanilla doesn’t have.
Trait Implementations§
§impl Clone for ItemDisplayContext
impl Clone for ItemDisplayContext
§fn clone(&self) -> ItemDisplayContext
fn clone(&self) -> ItemDisplayContext
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 ItemDisplayContext
§impl Debug for ItemDisplayContext
impl Debug for ItemDisplayContext
impl Eq for ItemDisplayContext
§impl Hash for ItemDisplayContext
impl Hash for ItemDisplayContext
§impl PartialEq for ItemDisplayContext
impl PartialEq for ItemDisplayContext
impl StructuralPartialEq for ItemDisplayContext
Auto Trait Implementations§
impl Freeze for ItemDisplayContext
impl RefUnwindSafe for ItemDisplayContext
impl Send for ItemDisplayContext
impl Sync for ItemDisplayContext
impl Unpin for ItemDisplayContext
impl UnsafeUnpin for ItemDisplayContext
impl UnwindSafe for ItemDisplayContext
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