pub struct Text<'a, ExtraData> {
pub info: RenderCommandInfo<'a, ExtraData>,
pub text: OwnedOrRef<'a, str>,
pub color: Color,
pub font_id: u16,
pub font_size: f32,
pub letter_spacing: f32,
pub line_height: f32,
}Expand description
Represents a text element with styling attributes.
Fields§
§info: RenderCommandInfo<'a, ExtraData>Shared metadata for renderer processing and ordering.
text: OwnedOrRef<'a, str>The text content.
color: ColorThe color of the text (solid or layered when complex_colored_text is enabled).
font_id: u16The ID of the font used.
font_size: f32The font size.
letter_spacing: f32The spacing between letters.
line_height: f32The line height.
Trait Implementations§
Auto Trait Implementations§
impl<'a, ExtraData> !RefUnwindSafe for Text<'a, ExtraData>
impl<'a, ExtraData> !UnwindSafe for Text<'a, ExtraData>
impl<'a, ExtraData> Freeze for Text<'a, ExtraData>
impl<'a, ExtraData> Send for Text<'a, ExtraData>
impl<'a, ExtraData> Sync for Text<'a, ExtraData>where
ExtraData: Sync,
impl<'a, ExtraData> Unpin for Text<'a, ExtraData>
impl<'a, ExtraData> UnsafeUnpin for Text<'a, ExtraData>
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§impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
Source§fn embed(self) -> RenderTList<H, TailTarget>
fn embed(self) -> RenderTList<H, TailTarget>
Converts
self into Target.