pub enum StringOrComponent {
String(String),
FormattedText(FormattedText),
}
Variants§
String(String)
FormattedText(FormattedText)
Trait Implementations§
Source§impl Clone for StringOrComponent
impl Clone for StringOrComponent
Source§fn clone(&self) -> StringOrComponent
fn clone(&self) -> StringOrComponent
Returns a copy 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 StringOrComponent
impl Debug for StringOrComponent
Source§impl Display for StringOrComponent
impl Display for StringOrComponent
Source§impl From<StringOrComponent> for TextComponent
impl From<StringOrComponent> for TextComponent
Source§fn from(soc: StringOrComponent) -> Self
fn from(soc: StringOrComponent) -> Self
Converts to this type from the input type.
Source§impl Hash for StringOrComponent
impl Hash for StringOrComponent
Source§impl PartialEq for StringOrComponent
impl PartialEq for StringOrComponent
Source§impl Serialize for StringOrComponent
impl Serialize for StringOrComponent
Source§impl ToNbtTag for StringOrComponent
impl ToNbtTag for StringOrComponent
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
impl Eq for StringOrComponent
impl StructuralPartialEq for StringOrComponent
Auto Trait Implementations§
impl Freeze for StringOrComponent
impl RefUnwindSafe for StringOrComponent
impl Send for StringOrComponent
impl Sync for StringOrComponent
impl Unpin for StringOrComponent
impl UnwindSafe for StringOrComponent
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)