Enum embedded_text::Token[][src]

pub enum Token<'a, C> where
    C: PixelColor, 
{ NewLine, CarriageReturn, Tab, Whitespace(u32, &'a str), Word(&'a str), Break(&'a str, &'a str), ChangeTextStyle(ChangeTextStyle<C>), MoveCursor { chars: i32, draw_background: bool, }, }
Expand description

A text token

Variants

NewLine

A newline character.

CarriageReturn

A \r character.

Tab

A \t character.

Whitespace

A number of whitespace characters.

Tuple Fields of Whitespace

0: u321: &'a str
Word

A word (a sequence of non-whitespace characters).

Tuple Fields of Word

0: &'a str
Break

A possible wrapping point

Tuple Fields of Break

0: &'a str1: &'a str
ChangeTextStyle

Change of text style.

Tuple Fields of ChangeTextStyle

0: ChangeTextStyle<C>
MoveCursor

Move the cursor by a number of characters.

Fields of MoveCursor

chars: i32

Number of characters to move.

draw_background: bool

True to draw over the area of movement with the background color.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Casts the value.

Should always be Self

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.