Struct pretty::BoxDoc[][src]

pub struct BoxDoc<'a, A>(_);

Methods from Deref<Target = Doc<'a, BoxDoc<'a, A>, A>>

Writes a rendered document to a std::io::Write object.

Writes a rendered document to a std::fmt::Write object.

Writes a rendered document to a RenderAnnotated<A> object.

Returns a value which implements std::fmt::Display

use pretty::Doc;
let doc = Doc::<_>::group(
    Doc::text("hello").append(Doc::space()).append(Doc::text("world"))
);
assert_eq!(format!("{}", doc.pretty(80)), "hello world");

Trait Implementations

impl<'a, A: Clone> Clone for BoxDoc<'a, A>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, A: Eq> Eq for BoxDoc<'a, A>
[src]

impl<'a, A: Ord> Ord for BoxDoc<'a, A>
[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, A: PartialEq> PartialEq for BoxDoc<'a, A>
[src]

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

This method tests for !=.

impl<'a, A: PartialOrd> PartialOrd for BoxDoc<'a, A>
[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> Debug for BoxDoc<'a, A> where
    A: Debug
[src]

Formats the value using the given formatter. Read more

impl<'a, A> Deref for BoxDoc<'a, A>
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl<'a, A> Send for BoxDoc<'a, A> where
    A: Send

impl<'a, A> Sync for BoxDoc<'a, A> where
    A: Sync