pub struct Formatter<Context> { /* private fields */ }Expand description
Core formatter traits, options, and formatted output wrappers.
Implementations§
Source§impl<Context> Formatter<Context>where
Context: FormatContext,
impl<Context> Formatter<Context>where
Context: FormatContext,
Source§impl<Context> Formatter<Context>
impl<Context> Formatter<Context>
pub fn context(&self) -> &Context
pub fn context_mut(&mut self) -> &mut Context
pub fn write_element(&mut self, element: FormatElement)
pub fn write_document(&mut self, document: Document)
pub fn finish(self) -> Formatted<Context>
Trait Implementations§
Source§impl<Context> Buffer for Formatter<Context>
impl<Context> Buffer for Formatter<Context>
fn write_element(&mut self, element: FormatElement)
fn elements(&self) -> &[FormatElement]
fn write_elements<I>(&mut self, elements: I)where
I: IntoIterator<Item = FormatElement>,
Auto Trait Implementations§
impl<Context> Freeze for Formatter<Context>where
Context: Freeze,
impl<Context> RefUnwindSafe for Formatter<Context>where
Context: RefUnwindSafe,
impl<Context> Send for Formatter<Context>where
Context: Send,
impl<Context> Sync for Formatter<Context>where
Context: Sync,
impl<Context> Unpin for Formatter<Context>where
Context: Unpin,
impl<Context> UnsafeUnpin for Formatter<Context>where
Context: UnsafeUnpin,
impl<Context> UnwindSafe for Formatter<Context>where
Context: 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