[][src]Struct glyph_brush::OwnedText

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

impl<X> OwnedText<X>[src]

pub fn with_text<T: Into<String>>(mut self: Self, text: T) -> Self[src]

pub fn with_scale<S: Into<PxScale>>(mut self: Self, scale: S) -> Self[src]

pub fn with_font_id<F: Into<FontId>>(mut self: Self, font_id: F) -> Self[src]

pub fn with_extra<X2>(self, extra: X2) -> OwnedText<X2>[src]

impl OwnedText<Extra>[src]

pub fn new<T: Into<String>>(text: T) -> Self[src]

pub fn with_color<C: Into<Color>>(mut self: Self, color: C) -> Self[src]

pub fn with_z<Z: Into<f32>>(mut self: Self, z: Z) -> Self[src]

Trait Implementations

impl<X: Clone> Clone for OwnedText<X>[src]

impl<X: Debug> Debug for OwnedText<X>[src]

impl<X: Default> Default for OwnedText<X>[src]

impl<X: Clone> From<&'_ Text<'_, X>> for OwnedText<X>[src]

impl<'a, X: Clone> From<&'a OwnedText<X>> for Text<'a, X>[src]

impl<X: PartialEq> PartialEq<OwnedText<X>> for OwnedText<X>[src]

impl<X> StructuralPartialEq for OwnedText<X>[src]

Auto Trait Implementations

impl<X> RefUnwindSafe for OwnedText<X> where
    X: RefUnwindSafe
[src]

impl<X> Send for OwnedText<X> where
    X: Send
[src]

impl<X> Sync for OwnedText<X> where
    X: Sync
[src]

impl<X> Unpin for OwnedText<X> where
    X: Unpin
[src]

impl<X> UnwindSafe for OwnedText<X> where
    X: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,