pub struct JsonRenderer<W: Write> { /* private fields */ }Expand description
JSON renderer — owns stdout exclusively in JSON mode.
Each call writes EXACTLY one serde_json document followed by a
single \n and flushes the underlying writer. Multiple invocations
of the binary therefore stream as NDJSON when concatenated.
Implementations§
Source§impl JsonRenderer<Stdout>
impl JsonRenderer<Stdout>
Trait Implementations§
Source§impl<W: Write> OutputRenderer for JsonRenderer<W>
impl<W: Write> OutputRenderer for JsonRenderer<W>
Auto Trait Implementations§
impl<W> !Freeze for JsonRenderer<W>
impl<W> !RefUnwindSafe for JsonRenderer<W>
impl<W> Send for JsonRenderer<W>where
W: Send,
impl<W> !Sync for JsonRenderer<W>
impl<W> Unpin for JsonRenderer<W>where
W: Unpin,
impl<W> UnsafeUnpin for JsonRenderer<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for JsonRenderer<W>where
W: 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