pub enum Content<V> {
Text {
text: String,
},
Translatable {
translate: String,
fallback: Option<String>,
with: Vec<Component<V>>,
},
Score {
score: Score,
},
Selector {
selector: String,
separator: Option<Box<Component<V>>>,
},
Keybind {
keybind: String,
},
Nbt {
nbt: String,
target: NbtTarget,
display: NbtDisplay,
separator: Option<Box<Component<V>>>,
},
Object {
object: ObjectContent,
fallback: Option<String>,
},
}Expand description
The mutually exclusive content payload of a ComponentObject.
Variants§
Text
Literal text.
Translatable
Text looked up from a translation key.
Fields
Score
A value from a scoreboard objective.
Selector
The names selected by an entity selector.
Fields
Keybind
The localized name of a client key binding.
Nbt
Values read from an NBT path.
Fields
§
display: NbtDisplayHow extracted values are rendered.
Object
A rendered object such as an atlas sprite or player head.
Fields
§
object: ObjectContentThe object-specific rendering data.
Trait Implementations§
impl<V: PartialEq> StructuralPartialEq for Content<V>
Auto Trait Implementations§
impl<V> Freeze for Content<V>
impl<V> RefUnwindSafe for Content<V>where
V: RefUnwindSafe,
impl<V> Send for Content<V>where
V: Send,
impl<V> Sync for Content<V>where
V: Sync,
impl<V> Unpin for Content<V>
impl<V> UnsafeUnpin for Content<V>
impl<V> UnwindSafe for Content<V>where
V: UnwindSafe + RefUnwindSafe,
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