pub struct TextComponent {
pub base: BaseComponent,
pub text: String,
}
Expand description
A component that contains text that’s the same in all locales.
Fields§
§base: BaseComponent
§text: String
Implementations§
Trait Implementations§
Source§impl Clone for TextComponent
impl Clone for TextComponent
Source§fn clone(&self) -> TextComponent
fn clone(&self) -> TextComponent
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 TextComponent
impl Debug for TextComponent
Source§impl Default for TextComponent
impl Default for TextComponent
Source§fn default() -> TextComponent
fn default() -> TextComponent
Returns the “default value” for a type. Read more
Source§impl Display for TextComponent
impl Display for TextComponent
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 TextComponent
impl Hash for TextComponent
Source§impl PartialEq for TextComponent
impl PartialEq for TextComponent
Source§impl Serialize for TextComponent
impl Serialize for TextComponent
Source§impl Serialize for TextComponent
impl Serialize for TextComponent
fn to_compound(self) -> NbtCompound
fn to_nbt(self) -> BaseNbt
impl Eq for TextComponent
impl StructuralPartialEq for TextComponent
Auto Trait Implementations§
impl Freeze for TextComponent
impl RefUnwindSafe for TextComponent
impl Send for TextComponent
impl Sync for TextComponent
impl Unpin for TextComponent
impl UnwindSafe for TextComponent
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
)