Struct TextStyle
#[non_exhaustive]pub struct TextStyle {
pub color: Option<String>,
pub shadow_color: Option<u32>,
pub bold: Option<bool>,
pub italic: Option<bool>,
pub underlined: Option<bool>,
pub strikethrough: Option<bool>,
pub obfuscated: Option<bool>,
pub click: Option<TextClick>,
pub hover: Option<TextHover>,
pub insertion: Option<String>,
pub font: Option<String>,
pub metadata: Tag,
}Expand description
Optional style fields inherit; explicit false overrides an inherited decoration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.color: Option<String>Named colour or #RRGGBB component colour.
shadow_color: Option<u32>Packed ARGB shadow colour; zero suppresses shadows.
bold: Option<bool>Bold decoration.
italic: Option<bool>Italic decoration.
underlined: Option<bool>Underline decoration.
strikethrough: Option<bool>Strikethrough decoration.
obfuscated: Option<bool>Obfuscated decoration.
click: Option<TextClick>Action invoked by clicking the component.
hover: Option<TextHover>Information displayed on hover.
insertion: Option<String>Text inserted into the chat input on Shift-click.
font: Option<String>Font identifier.
metadata: TagUnknown style fields, as a compound, without engine types.
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
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