pub struct Style<V> {
pub color: Option<TextColor>,
pub font: Option<ResourceLocation>,
pub bold: Option<bool>,
pub italic: Option<bool>,
pub underlined: Option<bool>,
pub strikethrough: Option<bool>,
pub obfuscated: Option<bool>,
pub shadow_color: Option<ShadowColor>,
pub insertion: Option<String>,
pub click_event: Option<ClickEvent<V>>,
pub hover_event: Option<HoverEvent<V>>,
}Expand description
Optional formatting and interaction properties for a component.
Fields§
§color: Option<TextColor>The text color.
font: Option<ResourceLocation>The font resource used to render text.
bold: Option<bool>Whether text is rendered in bold.
italic: Option<bool>Whether text is rendered in italics.
underlined: Option<bool>Whether text is underlined.
strikethrough: Option<bool>Whether text has a strikethrough line.
obfuscated: Option<bool>Whether text characters are continuously obfuscated.
shadow_color: Option<ShadowColor>The text shadow color.
insertion: Option<String>Text inserted into chat when the component is shift-clicked.
click_event: Option<ClickEvent<V>>The action performed when the component is clicked.
hover_event: Option<HoverEvent<V>>The content shown when the component is hovered.
Trait Implementations§
impl<V: PartialEq> StructuralPartialEq for Style<V>
Auto Trait Implementations§
impl<V> Freeze for Style<V>where
V: Freeze,
impl<V> RefUnwindSafe for Style<V>where
V: RefUnwindSafe,
impl<V> Send for Style<V>where
V: Send,
impl<V> Sync for Style<V>where
V: Sync,
impl<V> Unpin for Style<V>where
V: Unpin,
impl<V> UnsafeUnpin for Style<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Style<V>where
V: UnwindSafe + RefUnwindSafe,
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