pub enum PrimitiveOrComponent {
Boolean(bool),
Short(i16),
Integer(i32),
Long(i64),
Float(f32),
Double(f64),
String(String),
FormattedText(FormattedText),
}
Variants§
Boolean(bool)
Short(i16)
Integer(i32)
Long(i64)
Float(f32)
Double(f64)
String(String)
FormattedText(FormattedText)
Trait Implementations§
Source§impl Clone for PrimitiveOrComponent
impl Clone for PrimitiveOrComponent
Source§fn clone(&self) -> PrimitiveOrComponent
fn clone(&self) -> PrimitiveOrComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrimitiveOrComponent
impl Debug for PrimitiveOrComponent
Source§impl<'de> Deserialize<'de> for PrimitiveOrComponent
impl<'de> Deserialize<'de> for PrimitiveOrComponent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PrimitiveOrComponent
impl Display for PrimitiveOrComponent
Source§impl From<PrimitiveOrComponent> for TextComponent
impl From<PrimitiveOrComponent> for TextComponent
Source§fn from(soc: PrimitiveOrComponent) -> Self
fn from(soc: PrimitiveOrComponent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PrimitiveOrComponent
impl PartialEq for PrimitiveOrComponent
Source§impl Serialize for PrimitiveOrComponent
impl Serialize for PrimitiveOrComponent
Source§impl ToNbtTag for PrimitiveOrComponent
Available on crate feature simdnbt
only.
impl ToNbtTag for PrimitiveOrComponent
Available on crate feature
simdnbt
only.fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
impl StructuralPartialEq for PrimitiveOrComponent
Auto Trait Implementations§
impl Freeze for PrimitiveOrComponent
impl RefUnwindSafe for PrimitiveOrComponent
impl Send for PrimitiveOrComponent
impl Sync for PrimitiveOrComponent
impl Unpin for PrimitiveOrComponent
impl UnwindSafe for PrimitiveOrComponent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()
] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString
]. Read more