[][src]Enum dprint_core::PrintItem

pub enum PrintItem<TString = String, TInfo = Info, TCondition = Condition<TString, TInfo>> where
    TString: StringRef,
    TInfo: InfoRef,
    TCondition: ConditionRef<TString, TInfo, TCondition>, 
{ String(Rc<TString>), Condition(Rc<TCondition>), Info(Rc<TInfo>), NewLine, Tab, PossibleNewLine, SpaceOrNewLine, ExpectNewLine, StartIndent, FinishIndent, StartNewLineGroup, FinishNewLineGroup, SingleIndent, StartIgnoringIndent, FinishIgnoringIndent, }

The different items the printer could encounter.

Variants

String(Rc<TString>)
Condition(Rc<TCondition>)
Info(Rc<TInfo>)
NewLine

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

Tab

Signal that a tab 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.

Methods

impl PrintItem[src]

pub fn is_signal(&self) -> bool[src]

Trait Implementations

impl<TString, TInfo, TCondition> Clone for PrintItem<TString, TInfo, TCondition> where
    TString: StringRef,
    TInfo: InfoRef,
    TCondition: ConditionRef<TString, TInfo, TCondition>, 
[src]

impl<'_, TInfo, TCondition> Into<PrintItem<String, TInfo, TCondition>> for &'_ str where
    TInfo: InfoRef,
    TCondition: ConditionRef<String, TInfo, TCondition>, 
[src]

impl<TInfo, TCondition> Into<PrintItem<String, TInfo, TCondition>> for String where
    TInfo: InfoRef,
    TCondition: ConditionRef<String, TInfo, TCondition>, 
[src]

impl<TString, TCondition> Into<PrintItem<TString, Info, TCondition>> for Info where
    TString: StringRef,
    TCondition: ConditionRef<TString, Info, TCondition>, 
[src]

impl<TString, TInfo> Into<PrintItem<TString, TInfo, Condition<TString, TInfo>>> for Condition<TString, TInfo> where
    TString: StringRef,
    TInfo: InfoRef
[src]

Auto Trait Implementations

impl<TString = String, TInfo = Info, TCondition = Condition<TString, TInfo>> !RefUnwindSafe for PrintItem<TString, TInfo, TCondition>

impl<TString = String, TInfo = Info, TCondition = Condition<TString, TInfo>> !Send for PrintItem<TString, TInfo, TCondition>

impl<TString = String, TInfo = Info, TCondition = Condition<TString, TInfo>> !Sync for PrintItem<TString, TInfo, TCondition>

impl<TString, TInfo, TCondition> Unpin for PrintItem<TString, TInfo, TCondition>

impl<TString, TInfo, TCondition> UnwindSafe for PrintItem<TString, TInfo, TCondition> where
    TCondition: RefUnwindSafe,
    TInfo: RefUnwindSafe,
    TString: RefUnwindSafe

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.