Struct pretty::BoxDoc [−][src]
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]
pub fn render<'b, W: ?Sized>(&'b self, width: usize, out: &mut W) -> Result<()> where
T: Deref<Target = Doc<'b, T, A>>,
W: Write, 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]
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, 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]
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>, 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]
pub fn pretty<'b>(&'b self, width: usize) -> Pretty<'b, T, A> where
T: Deref<Target = Doc<'b, T, A>>, 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]
pub fn render_colored<'b, W>(&'b self, width: usize, out: W) -> Result<()> where
T: Deref<Target = Doc<'b, T, ColorSpec>>,
W: WriteColor, Trait Implementations
impl<'a, A: Clone> Clone for BoxDoc<'a, A>[src]
impl<'a, A: Clone> Clone for BoxDoc<'a, A>fn clone(&self) -> BoxDoc<'a, A>[src]
fn clone(&self) -> BoxDoc<'a, A>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'a, A: Eq> Eq for BoxDoc<'a, A>[src]
impl<'a, A: Eq> Eq for BoxDoc<'a, A>impl<'a, A: Ord> Ord for BoxDoc<'a, A>[src]
impl<'a, A: Ord> Ord for BoxDoc<'a, A>fn cmp(&self, other: &BoxDoc<'a, A>) -> Ordering[src]
fn cmp(&self, other: &BoxDoc<'a, A>) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl<'a, A: PartialEq> PartialEq for BoxDoc<'a, A>[src]
impl<'a, A: PartialEq> PartialEq for BoxDoc<'a, A>fn eq(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn eq(&self, other: &BoxDoc<'a, A>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn ne(&self, other: &BoxDoc<'a, A>) -> boolThis method tests for !=.
impl<'a, A: PartialOrd> PartialOrd for BoxDoc<'a, A>[src]
impl<'a, A: PartialOrd> PartialOrd for BoxDoc<'a, A>fn partial_cmp(&self, other: &BoxDoc<'a, A>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BoxDoc<'a, A>) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn lt(&self, other: &BoxDoc<'a, A>) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn le(&self, other: &BoxDoc<'a, A>) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn gt(&self, other: &BoxDoc<'a, A>) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &BoxDoc<'a, A>) -> bool[src]
fn ge(&self, other: &BoxDoc<'a, A>) -> boolThis 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]
impl<'a, A> Debug for BoxDoc<'a, A> where
A: Debug, fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, A> Deref for BoxDoc<'a, A>[src]
impl<'a, A> Deref for BoxDoc<'a, A>