[][src]Enum dprint_core::PrintItem

pub enum PrintItem {
    String(String),
    RawString(RawString),
    Condition(Condition),
    Info(Info),
    NewLine,
    PossibleNewLine,
    SpaceOrNewLine,
    ExpectNewLine,
    StartIndent,
    FinishIndent,
    StartNewLineGroup,
    FinishNewLineGroup,
    SingleIndent,
    StartIgnoringIndent,
    FinishIgnoringIndent,
}

The different items the printer could encounter.

Variants

String(String)
RawString(RawString)
Condition(Condition)
Info(Info)
NewLine

Signal that a new line should occur based on the printer settings.

PossibleNewLine

Signal that the current location could be a newline when exceeding the line width.

SpaceOrNewLine

Signal that the current location should be a space, but could be a newline if exceeding the line width.

ExpectNewLine

Expect the next character to be a newline. If it's not, force a newline.

StartIndent

Signal the start of a section that should be indented.

FinishIndent

Signal the end of a section that should be indented.

StartNewLineGroup

Signal the start of a group of print items that have a lower precedence for being broken up with a newline for exceeding the line width.

FinishNewLineGroup

Signal the end of a newline group.

SingleIndent

Signal that a single indent should occur based on the printer settings.

StartIgnoringIndent

Signal to the printer that it should stop using indentation.

FinishIgnoringIndent

Signal to the printer that it should start using indentation again.

Trait Implementations

impl<'_> Into<PrintItem> for &'_ str[src]

impl Into<PrintItem> for String[src]

impl<'_> Into<PrintItem> for &'_ String[src]

impl Into<PrintItem> for Info[src]

impl Into<PrintItem> for Condition[src]

impl Clone for PrintItem[src]

Auto Trait Implementations

impl !Send for PrintItem

impl !Sync for PrintItem

impl Unpin for PrintItem

impl !UnwindSafe for PrintItem

impl !RefUnwindSafe for PrintItem

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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