[][src]Trait embedded_text::rendering::StateFactory

pub trait StateFactory {
    type PixelIteratorState;
    fn create_state(&self) -> Self::PixelIteratorState;
}

This trait is used to associate a state type to a horizontal alignment option.

Associated Types

type PixelIteratorState

The type of the state variable used for rendering.

Loading content...

Required methods

fn create_state(&self) -> Self::PixelIteratorState

Creates a new state variable.

Loading content...

Implementors

impl<'a, C, F> StateFactory for StyledTextBox<'a, C, F, CenterAligned> where
    C: PixelColor,
    F: Font + Copy
[src]

type PixelIteratorState = CenterAlignedState<'a, C, F>

impl<'a, C, F> StateFactory for StyledTextBox<'a, C, F, Justified> where
    C: PixelColor,
    F: Font + Copy
[src]

type PixelIteratorState = JustifiedState<'a, C, F>

impl<'a, C, F> StateFactory for StyledTextBox<'a, C, F, LeftAligned> where
    C: PixelColor,
    F: Font + Copy
[src]

type PixelIteratorState = LeftAlignedState<'a, C, F>

impl<'a, C, F> StateFactory for StyledTextBox<'a, C, F, RightAligned> where
    C: PixelColor,
    F: Font + Copy
[src]

type PixelIteratorState = RightAlignedState<'a, C, F>

Loading content...