Enum pretty::Doc [] [src]

pub enum Doc<'a, B> {
    Nil,
    Append(B, B),
    Group(B),
    Nest(usize, B),
    Space,
    Newline,
    Text(Cow<'a, str>),
}

The concrete document type. This type is not meant to be used directly. Instead use the static functions on Doc or the methods on an DocAllocator.

The B parameter is used to abstract over pointers to Doc. See RefDoc and BoxDoc for how it is used

Variants

Methods

impl<'a, B> Doc<'a, B>
[src]

Writes a rendered document.

impl<'a, B> Doc<'a, B>
[src]

impl<'a> Doc<'a, BoxDoc<'a>>
[src]

Trait Implementations

impl<'a, B: Clone> Clone for Doc<'a, B>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, B: Debug> Debug for Doc<'a, B>
[src]

Formats the value using the given formatter. Read more

impl<'a, B: Eq> Eq for Doc<'a, B>
[src]

impl<'a, B: Ord> Ord for Doc<'a, B>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'a, B: PartialEq> PartialEq for Doc<'a, B>
[src]

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

This method tests for !=.

impl<'a, B: PartialOrd> PartialOrd for Doc<'a, B>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, B, S> From<S> for Doc<'a, B> where
    S: Into<Cow<'a, str>>, 
[src]

Performs the conversion.

impl<'a, A: ?Sized> Into<Doc<'a, A::Doc>> for DocBuilder<'a, A> where
    A: DocAllocator<'a>, 
[src]

Performs the conversion.

Auto Trait Implementations

impl<'a, B> Send for Doc<'a, B> where
    B: Send

impl<'a, B> Sync for Doc<'a, B> where
    B: Sync