Enum genco::Element [] [src]

pub enum Element<'element, C: 'element> {
    Append(Contained<'element, Tokens<'element, C>>),
    Push(Contained<'element, Tokens<'element, C>>),
    Nested(Contained<'element, Tokens<'element, C>>),
    Spacing,
    LineSpacing,
    Literal(Cow<'element, str>),
    Quoted(Cow<'element, str>),
    Custom(Contained<'element, C>),
}

A single element in a set of tokens.

Variants

Append the given set of tokens.

Push the owned set of tokens, adding a newline if current line is not empty.

Nested on indentation level.

Single-space spacing.

New line if needed.

A borrowed string.

A borrowed quoted string.

Language-specific items.

Methods

impl<'element, C: Custom> Element<'element, C>
[src]

[src]

Format the given element.

Trait Implementations

impl<'element, C: Debug + 'element> Debug for Element<'element, C>
[src]

[src]

Formats the value using the given formatter.

impl<'element, C: Clone + 'element> Clone for Element<'element, C>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'element, C: PartialEq + 'element> PartialEq for Element<'element, C>
[src]

[src]

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

[src]

This method tests for !=.

impl<'element, C: Eq + 'element> Eq for Element<'element, C>
[src]

impl<'element, C> From<&'element str> for Element<'element, C>
[src]

[src]

Performs the conversion.

impl<'element, C: Custom> From<&'element C> for Element<'element, C>
[src]

[src]

Performs the conversion.

impl<'element, C> From<String> for Element<'element, C>
[src]

[src]

Performs the conversion.

impl<'element, C> From<Tokens<'element, C>> for Element<'element, C>
[src]

[src]

Performs the conversion.

impl<'element, C: Custom> From<C> for Element<'element, C>
[src]

[src]

Performs the conversion.