Struct fontdue::layout::TextStyle[][src]

pub struct TextStyle<'a, U: Copy + Clone = ()> {
    pub text: &'a str,
    pub px: f32,
    pub font_index: usize,
    pub user_data: U,
}
Expand description

A style description for a segment of text.

Fields

text: &'a str
Expand description

The text to layout.

px: f32
Expand description

The scale of the text in pixel units.

font_index: usize
Expand description

The font to layout the text in.

user_data: U
Expand description

Additional user data to associate with glyphs produced by this text style.

Implementations

impl<'a> TextStyle<'a>[src]

pub fn new(text: &'a str, px: f32, font_index: usize) -> TextStyle<'a>[src]

impl<'a, U: Copy + Clone> TextStyle<'a, U>[src]

pub fn with_user_data(
    text: &'a str,
    px: f32,
    font_index: usize,
    user_data: U
) -> TextStyle<'a, U>
[src]

Auto Trait Implementations

impl<'a, U> RefUnwindSafe for TextStyle<'a, U> where
    U: RefUnwindSafe

impl<'a, U> Send for TextStyle<'a, U> where
    U: Send

impl<'a, U> Sync for TextStyle<'a, U> where
    U: Sync

impl<'a, U> Unpin for TextStyle<'a, U> where
    U: Unpin

impl<'a, U> UnwindSafe for TextStyle<'a, U> where
    U: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.