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
sourceimpl<'_, X> ToSectionText for Text<'_, X>
impl<'_, X> ToSectionText for Text<'_, X>
fn to_section_text(&self) -> SectionText<'_>
impl<'a, X> Copy for Text<'a, X> where
X: Copy,
impl<'a, X> StructuralPartialEq for Text<'a, X>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.