pub struct Text<'a, X = Extra> {
pub text: &'a str,
pub scale: PxScale,
pub font_id: FontId,
pub extra: X,
}
Expand description
SectionText
+ extra.
Fields§
§text: &'a str
Text to render.
scale: PxScale
Pixel scale of text. Defaults to 16.
font_id: FontId
Font id to use for this section.
It must be a valid id in the FontMap
used for layout calls.
The default FontId(0)
should always be valid.
extra: X
Extra stuff for vertex generation.
Implementations§
Trait Implementations§
source§impl<'a> From<&Text<'a>> for SectionText<'a>
impl<'a> From<&Text<'a>> for SectionText<'a>
source§impl<'a> From<Text<'a>> for SectionText<'a>
impl<'a> From<Text<'a>> for SectionText<'a>
source§impl<X> ToSectionText for Text<'_, X>
impl<X> ToSectionText for Text<'_, X>
fn to_section_text(&self) -> SectionText<'_>
impl<'a, X: Copy> Copy for Text<'a, X>
impl<'a, X> StructuralPartialEq for Text<'a, X>
Auto Trait Implementations§
impl<'a, X> Freeze for Text<'a, X>where
X: Freeze,
impl<'a, X> RefUnwindSafe for Text<'a, X>where
X: RefUnwindSafe,
impl<'a, X> Send for Text<'a, X>where
X: Send,
impl<'a, X> Sync for Text<'a, X>where
X: Sync,
impl<'a, X> Unpin for Text<'a, X>where
X: Unpin,
impl<'a, X> UnwindSafe for Text<'a, X>where
X: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more