pub struct OwnedText<X = Extra> {
pub text: String,
pub scale: PxScale,
pub font_id: FontId,
pub extra: X,
}
Fields§
§text: String
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 known to the GlyphBrush
it is being used with,
either FontId::default()
or the return of
add_font
.
extra: X
Implementations§
Source§impl<X> OwnedText<X>
impl<X> OwnedText<X>
pub fn with_text<T>(self, text: T) -> OwnedText<X>
pub fn with_scale<S>(self, scale: S) -> OwnedText<X>
pub fn with_font_id<F>(self, font_id: F) -> OwnedText<X>
pub fn with_extra<X2>(self, extra: X2) -> OwnedText<X2>
Trait Implementations§
impl<X> StructuralPartialEq for OwnedText<X>
Auto Trait Implementations§
impl<X> Freeze for OwnedText<X>where
X: Freeze,
impl<X> RefUnwindSafe for OwnedText<X>where
X: RefUnwindSafe,
impl<X> Send for OwnedText<X>where
X: Send,
impl<X> Sync for OwnedText<X>where
X: Sync,
impl<X> Unpin for OwnedText<X>where
X: Unpin,
impl<X> UnwindSafe for OwnedText<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§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