pretty

Trait 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>,