pub struct TextStyle<'a, U: Copy + Clone = ()> {
pub text: &'a str,
pub px: f32,
pub font_index: usize,
pub user_data: U,
}
Expand description
A style description for a segment of text.
Fields§
§text: &'a str
The text to layout.
px: f32
The scale of the text in pixel units. The units of the scale are pixels per Em unit.
font_index: usize
The font to layout the text in.
user_data: U
Additional user data to associate with glyphs produced by this text style.
Implementations§
Auto Trait Implementations§
impl<'a, U> RefUnwindSafe for TextStyle<'a, U>where
U: RefUnwindSafe,
impl<'a, U> Send for TextStyle<'a, U>where
U: Send,
impl<'a, U> Sync for TextStyle<'a, U>where
U: Sync,
impl<'a, U> Unpin for TextStyle<'a, U>where
U: Unpin,
impl<'a, U> UnwindSafe for TextStyle<'a, U>where
U: UnwindSafe,
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