Trait pretty::Pretty

source ·
pub trait Pretty<'a, D, A = ()>
where A: 'a, D: ?Sized + DocAllocator<'a, A>,
{ // Required method fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>; }
Expand description

Trait for types which can be converted to a Document

Required Methods§

source

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

Converts self into a document

Implementations on Foreign Types§

source§

impl<'a, D, A> Pretty<'a, D, A> for &'a str
where A: 'a, D: ?Sized + DocAllocator<'a, A>,

source§

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

source§

impl<'a, D, A> Pretty<'a, D, A> for &'a String
where A: 'a, D: ?Sized + DocAllocator<'a, A>,

source§

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

source§

impl<'a, D, A> Pretty<'a, D, A> for String
where A: 'a, D: ?Sized + DocAllocator<'a, A>,

source§

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

source§

impl<'a, D, A, S> Pretty<'a, D, A> for Cow<'a, S>
where A: 'a, D: ?Sized + DocAllocator<'a, A>, S: ?Sized + ToOwned, &'a S: Pretty<'a, D, A>, S::Owned: Pretty<'a, D, A>,

source§

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

source§

impl<'a, D, A, T> Pretty<'a, D, A> for Option<T>
where A: 'a, D: ?Sized + DocAllocator<'a, A>, T: Pretty<'a, D, A>,

source§

fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>

Implementors§

source§

impl<'a, A> Pretty<'a, Arena<'a, A>, A> for RefDoc<'a, A>
where A: 'a,

source§

impl<'a, A> Pretty<'a, BoxAllocator, A> for BoxDoc<'a, A>
where A: 'a,

source§

impl<'a, A> Pretty<'a, RcAllocator, A> for RcDoc<'a, A>
where A: 'a,

source§

impl<'a, D, A> Pretty<'a, D, A> for BuildDoc<'a, D::Doc, A>
where A: 'a, D: ?Sized + DocAllocator<'a, A>,

source§

impl<'a, D, A> Pretty<'a, D, A> for Doc<'a, D::Doc, A>
where A: 'a, D: ?Sized + DocAllocator<'a, A>,

source§

impl<'a, D, A> Pretty<'a, D, A> for DocBuilder<'a, D, A>
where A: 'a, D: ?Sized + DocAllocator<'a, A>,