[][src]Struct glyph_brush::Text

pub struct Text<'a, X = Extra> {
    pub text: &'a str,
    pub scale: PxScale,
    pub font_id: FontId,
    pub extra: X,
}

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

impl<'a, X> Text<'a, X>[src]

pub fn with_text(self, text: &str) -> Text<'_, X>[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) -> Text<'a, X2>[src]

impl<'a> Text<'a, Extra>[src]

pub fn new(text: &'a str) -> 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<'a, X: Clone> Clone for Text<'a, X>[src]

impl<'a, X: Copy> Copy for Text<'a, X>[src]

impl<'a, X: Debug> Debug for Text<'a, X>[src]

impl<X: Default> Default for Text<'static, X>[src]

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

impl<'a> From<&'_ Text<'a, Extra>> for SectionText<'a>[src]

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

impl<'a> From<Text<'a, Extra>> for SectionText<'a>[src]

impl<'a, X: PartialEq> PartialEq<Text<'a, X>> for Text<'a, X>[src]

impl<'a, X> StructuralPartialEq for Text<'a, X>[src]

impl<X> ToSectionText for Text<'_, X>[src]

Auto Trait Implementations

impl<'a, X> RefUnwindSafe for Text<'a, X> where
    X: RefUnwindSafe
[src]

impl<'a, X> Send for Text<'a, X> where
    X: Send
[src]

impl<'a, X> Sync for Text<'a, X> where
    X: Sync
[src]

impl<'a, X> Unpin for Text<'a, X> where
    X: Unpin
[src]

impl<'a, X> UnwindSafe for Text<'a, 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>,