Trait embedded_text::rendering::StateFactory

source ·
pub trait StateFactory {
    type PixelIteratorState;

    // Required method
    fn create_state(&self) -> Self::PixelIteratorState;
}
Expand description

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

Required Associated Types§

source

type PixelIteratorState

The type of the state variable used for rendering.

Required Methods§

source

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

Creates a new state variable.

Implementors§

source§

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

source§

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

source§

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

source§

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