pub struct BlockDoc<'doc, D, A>where
D: DocAllocator<'doc, A>,{
pub affixes: Vec<Affixes<'doc, D, A>>,
pub body: DocBuilder<'doc, D, A>,
}
Expand description
Formats a set of prefix
and suffix
documents around a body
The following document split into the prefixes [\x y ->, \z ->, {], suffixes [nil, nil, }] and body [result: x + y - z] will try to be formatted
\x y -> \z -> { result: x + y - z }
\x y -> \z -> {
result: x + y - z
}
\x y -> \z ->
{
result: x + y - z
}
\x y ->
\z ->
{
result: x + y - z
}
Fields§
§affixes: Vec<Affixes<'doc, D, A>>
§body: DocBuilder<'doc, D, A>
Implementations§
Auto Trait Implementations§
impl<'doc, D, A> Freeze for BlockDoc<'doc, D, A>where
<D as DocAllocator<'doc, A>>::Doc: Freeze,
A: Freeze,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: Freeze,
impl<'doc, D, A> RefUnwindSafe for BlockDoc<'doc, D, A>where
D: RefUnwindSafe,
<D as DocAllocator<'doc, A>>::Doc: RefUnwindSafe,
A: RefUnwindSafe,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: RefUnwindSafe,
impl<'doc, D, A> Send for BlockDoc<'doc, D, A>where
D: Sync,
<D as DocAllocator<'doc, A>>::Doc: Send,
A: Send,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: Send,
impl<'doc, D, A> Sync for BlockDoc<'doc, D, A>where
D: Sync,
<D as DocAllocator<'doc, A>>::Doc: Sync,
A: Sync,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: Sync,
impl<'doc, D, A> Unpin for BlockDoc<'doc, D, A>where
<D as DocAllocator<'doc, A>>::Doc: Unpin,
A: Unpin,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: Unpin,
impl<'doc, D, A> UnwindSafe for BlockDoc<'doc, D, A>where
D: RefUnwindSafe,
<D as DocAllocator<'doc, A>>::Doc: UnwindSafe,
A: UnwindSafe,
<<D as DocAllocator<'doc, A>>::Doc as DocPtr<'doc, A>>::ColumnFn: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more