Expand description
TextComponent : Rich text content.
Fields
value: StringThe actual plain text.
decorator_set: Option<Vec<Decorator>>A set of content decorators.
Implementations
sourceimpl TextComponent
impl TextComponent
sourcepub fn new(value: String) -> TextComponent
pub fn new(value: String) -> TextComponent
Rich text content.
Trait Implementations
sourceimpl Clone for TextComponent
impl Clone for TextComponent
sourcefn clone(&self) -> TextComponent
fn clone(&self) -> TextComponent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for TextComponent
impl Debug for TextComponent
sourceimpl Default for TextComponent
impl Default for TextComponent
sourcefn default() -> TextComponent
fn default() -> TextComponent
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for TextComponent
impl<'de> Deserialize<'de> for TextComponent
sourcefn 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
sourceimpl PartialEq<TextComponent> for TextComponent
impl PartialEq<TextComponent> for TextComponent
sourcefn eq(&self, other: &TextComponent) -> bool
fn eq(&self, other: &TextComponent) -> bool
sourceimpl Serialize for TextComponent
impl Serialize for TextComponent
impl StructuralPartialEq for TextComponent
Auto Trait Implementations
impl RefUnwindSafe for TextComponent
impl Send for TextComponent
impl Sync for TextComponent
impl Unpin for TextComponent
impl UnwindSafe for TextComponent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more