Struct pretty::DocBuilder
[−]
[src]
pub struct DocBuilder<'a, A: ?Sized>(pub &'a A, pub Doc<'a, A::Doc>)
where
A: DocAllocator<'a> + 'a;
The DocBuilder
type allows for convenient appending of documents even for arena allocated
documents by storing the arena inline.
Methods
impl<'a, 's, A: ?Sized> DocBuilder<'a, A> where
A: DocAllocator<'a>,
[src]
A: DocAllocator<'a>,
pub fn append<B>(self, that: B) -> DocBuilder<'a, A> where
B: Into<Doc<'a, A::Doc>>,
[src]
B: Into<Doc<'a, A::Doc>>,
pub fn group(self) -> DocBuilder<'a, A>
[src]
pub fn nest(self, offset: usize) -> DocBuilder<'a, A>
[src]
Trait Implementations
impl<'a, A: Eq + ?Sized> Eq for DocBuilder<'a, A> where
A: DocAllocator<'a> + 'a,
A::Doc: Eq,
[src]
A: DocAllocator<'a> + 'a,
A::Doc: Eq,
impl<'a, A: Ord + ?Sized> Ord for DocBuilder<'a, A> where
A: DocAllocator<'a> + 'a,
A::Doc: Ord,
[src]
A: DocAllocator<'a> + 'a,
A::Doc: Ord,
fn cmp(&self, __arg_0: &DocBuilder<'a, A>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<'a, A: PartialEq + ?Sized> PartialEq for DocBuilder<'a, A> where
A: DocAllocator<'a> + 'a,
A::Doc: PartialEq,
[src]
A: DocAllocator<'a> + 'a,
A::Doc: PartialEq,
fn eq(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests for !=
.
impl<'a, A: PartialOrd + ?Sized> PartialOrd for DocBuilder<'a, A> where
A: DocAllocator<'a> + 'a,
A::Doc: PartialOrd,
[src]
A: DocAllocator<'a> + 'a,
A::Doc: PartialOrd,
fn partial_cmp(&self, __arg_0: &DocBuilder<'a, A>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &DocBuilder<'a, A>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a, A: DocAllocator<'a> + 'a> Clone for DocBuilder<'a, A>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, A: ?Sized> Into<Doc<'a, A::Doc>> for DocBuilder<'a, A> where
A: DocAllocator<'a>,
[src]
A: DocAllocator<'a>,