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]

[src]

Writes a rendered document.

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

[src]

[src]

[src]

[src]

[src]

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

[src]

[src]

[src]

[src]

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[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]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<'a, B: PartialEq> PartialEq for Doc<'a, B>
[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<'a, B: PartialOrd> PartialOrd for Doc<'a, B>
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

Performs the conversion.

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

[src]

Performs the conversion.