Struct pretty::DocBuilder[][src]

pub struct DocBuilder<'a, D: ?Sized, A = ()>(pub &'a D, pub Doc<'a, D::Doc, A>)
where
    D: DocAllocator<'a, A> + 'a
;

The DocBuilder type allows for convenient appending of documents even for arena allocated documents by storing the arena inline.

Methods

impl<'a, 's, D: ?Sized, A> DocBuilder<'a, D, A> where
    D: DocAllocator<'a, A>, 
[src]

Append the given document after this document.

Mark this document as a group.

Groups are layed out on a single line if possible. Within a group, all basic documents with several possible layouts are assigned the same layout, that is, they are all layed out horizontally and combined into a one single line, or they are each layed out on their own line.

Increase the indentation level of this document.

Trait Implementations

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

impl<'a, D: Ord + ?Sized, A: Ord> Ord for DocBuilder<'a, D, A> where
    D: DocAllocator<'a, A> + 'a,
    D::Doc: Ord
[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, D: PartialEq + ?Sized, A: PartialEq> PartialEq for DocBuilder<'a, D, A> where
    D: DocAllocator<'a, A> + 'a,
    D::Doc: PartialEq
[src]

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

This method tests for !=.

impl<'a, D: PartialOrd + ?Sized, A: PartialOrd> PartialOrd for DocBuilder<'a, D, A> where
    D: DocAllocator<'a, A> + 'a,
    D::Doc: PartialOrd
[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, A, D> Clone for DocBuilder<'a, D, A> where
    A: Clone,
    D: DocAllocator<'a, A> + 'a,
    D::Doc: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Performs the conversion.

Auto Trait Implementations

impl<'a, D: ?Sized, A> Send for DocBuilder<'a, D, A> where
    A: Send,
    D: Sync,
    <D as DocAllocator<'a, A>>::Doc: Send

impl<'a, D: ?Sized, A> Sync for DocBuilder<'a, D, A> where
    A: Sync,
    D: Sync,
    <D as DocAllocator<'a, A>>::Doc: Sync