pub struct JsonlSink<W: Write + Send> { /* private fields */ }Expand description
Writes one JSON object per line to W, flushing after every event so a
trace is visible as it happens rather than only at exit.
The writer is behind a lock so that a line written from a task thread is written whole: concurrent tasks produce events at the same time, and half a JSON object is not a trace line.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<W> !Freeze for JsonlSink<W>
impl<W> RefUnwindSafe for JsonlSink<W>
impl<W> Send for JsonlSink<W>
impl<W> Sync for JsonlSink<W>
impl<W> Unpin for JsonlSink<W>where
W: Unpin,
impl<W> UnsafeUnpin for JsonlSink<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for JsonlSink<W>
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