pub struct CursorPrettyWriteSink<'a, T: SourceCursorSink<'a>> { /* private fields */ }Expand description
This is a CursorSink that wraps a sink (impl SourceCursorSink) and on each CursorSink::append() call, will write
the contents of the cursor Cursor given into the given Writer - using the given &'a str as the original source.
This also attempts to write additional newlines and indentation into the Writer to create a more aesthetically
pleasing output. It can be used as a light-weight formatter for ToCursors structs.
Implementations§
Source§impl<'a, T: SourceCursorSink<'a>> CursorPrettyWriteSink<'a, T>
impl<'a, T: SourceCursorSink<'a>> CursorPrettyWriteSink<'a, T>
Trait Implementations§
Source§impl<'a, T: SourceCursorSink<'a>> CursorSink for CursorPrettyWriteSink<'a, T>
impl<'a, T: SourceCursorSink<'a>> CursorSink for CursorPrettyWriteSink<'a, T>
Source§impl<'a, T: SourceCursorSink<'a>> SourceCursorSink<'a> for CursorPrettyWriteSink<'a, T>
impl<'a, T: SourceCursorSink<'a>> SourceCursorSink<'a> for CursorPrettyWriteSink<'a, T>
fn append(&mut self, c: SourceCursor<'a>)
Auto Trait Implementations§
impl<'a, T> Freeze for CursorPrettyWriteSink<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for CursorPrettyWriteSink<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CursorPrettyWriteSink<'a, T>where
T: Send,
impl<'a, T> Sync for CursorPrettyWriteSink<'a, T>where
T: Sync,
impl<'a, T> Unpin for CursorPrettyWriteSink<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for CursorPrettyWriteSink<'a, T>where
T: 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