pub struct SectionText<'a> {
pub text: &'a str,
pub scale: PxScale,
pub font_id: FontId,
}
Expand description
Text to layout together using a font & scale.
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.
Trait Implementations§
source§impl<'a> Clone for SectionText<'a>
impl<'a> Clone for SectionText<'a>
source§fn clone(&self) -> SectionText<'a>
fn clone(&self) -> SectionText<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for SectionText<'a>
impl<'a> Debug for SectionText<'a>
source§impl Default for SectionText<'static>
impl Default for SectionText<'static>
source§fn default() -> SectionText<'static>
fn default() -> SectionText<'static>
Returns the “default value” for a type. Read more
source§impl<'a> PartialEq for SectionText<'a>
impl<'a> PartialEq for SectionText<'a>
source§impl ToSectionText for &SectionText<'_>
impl ToSectionText for &SectionText<'_>
fn to_section_text(&self) -> SectionText<'_>
source§impl ToSectionText for SectionText<'_>
impl ToSectionText for SectionText<'_>
fn to_section_text(&self) -> SectionText<'_>
impl<'a> Copy for SectionText<'a>
impl<'a> StructuralPartialEq for SectionText<'a>
Auto Trait Implementations§
impl<'a> Freeze for SectionText<'a>
impl<'a> RefUnwindSafe for SectionText<'a>
impl<'a> Send for SectionText<'a>
impl<'a> Sync for SectionText<'a>
impl<'a> Unpin for SectionText<'a>
impl<'a> UnwindSafe for SectionText<'a>
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