pub struct Text {
pub text: String,
pub color: Color,
pub font_size: u16,
pub letter_spacing: u16,
pub line_height: u16,
pub font_asset: Option<&'static FontAsset>,
}Expand description
Represents a text element with styling attributes.
Fields§
§text: StringThe text content.
color: ColorThe color of the text.
font_size: u16The font size.
letter_spacing: u16The spacing between letters.
line_height: u16The line height.
font_asset: Option<&'static FontAsset>The font asset, if specified via .font().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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