[−][src]Struct pretty::RefDoc
Newtype wrapper for &Doc
Methods from Deref<Target = Doc<'a, RefDoc<'a, A>, A>>
pub fn render<W: ?Sized>(&self, width: usize, out: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Writes a rendered document to a std::io::Write
object.
pub fn render_fmt<W: ?Sized>(&self, width: usize, out: &mut W) -> Result where
W: Write,
[src]
W: Write,
Writes a rendered document to a std::fmt::Write
object.
pub fn render_raw<W: ?Sized>(
&self,
width: usize,
out: &mut W
) -> Result<(), W::Error> where
W: RenderAnnotated<A>,
[src]
&self,
width: usize,
out: &mut W
) -> Result<(), W::Error> where
W: RenderAnnotated<A>,
Writes a rendered document to a RenderAnnotated<A>
object.
pub fn pretty<'d>(&'d self, width: usize) -> Pretty<'a, 'd, T, A>
[src]
Returns a value which implements std::fmt::Display
use pretty::{Doc, BoxDoc}; let doc = BoxDoc::<()>::group( BoxDoc::text("hello").append(Doc::line()).append(Doc::text("world")) ); assert_eq!(format!("{}", doc.pretty(80)), "hello world");
pub fn render_colored<W>(&self, width: usize, out: W) -> Result<()> where
W: WriteColor,
[src]
W: WriteColor,
Trait Implementations
impl<'_, A> Clone for RefDoc<'_, A>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'_, A> Copy for RefDoc<'_, A>
[src]
impl<'a, A> Debug for RefDoc<'a, A> where
A: Debug,
[src]
A: Debug,
impl<'a, A> Deref for RefDoc<'a, A>
[src]
type Target = Doc<'a, RefDoc<'a, A>, A>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'a, A> DocPtr<'a, A> for RefDoc<'a, A>
[src]
impl<'a, A> From<RefDoc<'a, A>> for BuildDoc<'a, RefDoc<'a, A>, A>
[src]
Auto Trait Implementations
impl<'a, A = ()> !RefUnwindSafe for RefDoc<'a, A>
impl<'a, A = ()> !Send for RefDoc<'a, A>
impl<'a, A = ()> !Sync for RefDoc<'a, A>
impl<'a, A> Unpin for RefDoc<'a, A>
impl<'a, A = ()> !UnwindSafe for RefDoc<'a, A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,