[][src]Struct pretty::BoxDoc

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

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

pub fn render<'b, W: ?Sized>(&'b self, width: usize, out: &mut W) -> Result<()> where
    T: Deref<Target = Doc<'b, T, A>>,
    W: Write
[src]

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

pub fn render_fmt<'b, W: ?Sized>(&'b self, width: usize, out: &mut W) -> Result where
    T: Deref<Target = Doc<'b, T, A>>,
    W: Write
[src]

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

pub fn render_raw<'b, W: ?Sized>(
    &'b self,
    width: usize,
    out: &mut W
) -> Result<(), W::Error> where
    T: Deref<Target = Doc<'b, T, A>>,
    W: RenderAnnotated<A>, 
[src]

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

pub fn pretty<'b>(&'b self, width: usize) -> Pretty<'b, T, A> where
    T: Deref<Target = Doc<'b, T, A>>, 
[src]

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");

pub fn render_colored<'b, W>(&'b self, width: usize, out: W) -> Result<()> where
    T: Deref<Target = Doc<'b, T, ColorSpec>>,
    W: WriteColor, 
[src]

Trait Implementations

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

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

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

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

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

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

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

type Target = Doc<'a, BoxDoc<'a, A>, A>

The resulting type after dereferencing.

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

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

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

impl<'a, A> Unpin for BoxDoc<'a, A>

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

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

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]