Struct pretty::RcAllocator [−][src]
pub struct RcAllocator;
Trait Implementations
fn alloc_column_fn(
&'a self,
f: impl Fn(usize) -> Self::Doc + 'a
) -> <Self::Doc as DocPtr<'a, A>>::ColumnFn
fn alloc_width_fn(
&'a self,
f: impl Fn(isize) -> Self::Doc + 'a
) -> <Self::Doc as DocPtr<'a, A>>::WidthFn
Allocate an empty document.
Fails document rendering immediately. Read more
Allocate a single hardline.
A line acts like a \n
but behaves like space
if it is grouped on a single line.
Acts like line
but behaves like nil
if grouped on a single line Read more
A softline
acts like space
if the document fits the page, otherwise like line
A softline_
acts like nil
if the document fits the page, otherwise like line_
Allocate a document containing the text t.to_string()
. Read more
Allocate a document containing the given text. Read more
fn concat<I>(&'a self, docs: I) -> DocBuilder<'a, Self, A> where
I: IntoIterator,
I::Item: Pretty<'a, Self, A>,
fn concat<I>(&'a self, docs: I) -> DocBuilder<'a, Self, A> where
I: IntoIterator,
I::Item: Pretty<'a, Self, A>,
Allocate a document concatenating the given documents.
fn intersperse<I, S>(&'a self, docs: I, separator: S) -> DocBuilder<'a, Self, A> where
I: IntoIterator,
I::Item: Pretty<'a, Self, A>,
S: Pretty<'a, Self, A> + Clone,
fn intersperse<I, S>(&'a self, docs: I, separator: S) -> DocBuilder<'a, Self, A> where
I: IntoIterator,
I::Item: Pretty<'a, Self, A>,
S: Pretty<'a, Self, A> + Clone,
Allocate a document that intersperses the given separator S
between the given documents
[A, B, C, ..., Z]
, yielding [A, S, B, S, C, S, ..., S, Z]
. Read more
Allocate a document that acts differently based on the position and page layout Read more
Allocate a document that acts differently based on the current nesting level Read more
Converts self
into a document