pub struct JsonArrayEncoder<W>where
W: Write,{ /* private fields */ }Implementations§
Source§impl<W> JsonArrayEncoder<W>where
W: Write,
impl<W> JsonArrayEncoder<W>where
W: Write,
pub fn new(writer: W) -> JsonArrayEncoder<W>
pub fn into_inner(self) -> W
Trait Implementations§
Source§impl<W> RowEncoder for JsonArrayEncoder<W>where
W: Write,
impl<W> RowEncoder for JsonArrayEncoder<W>where
W: Write,
Source§fn begin(&mut self, _columns: &[String]) -> Result<(), Error>
fn begin(&mut self, _columns: &[String]) -> Result<(), Error>
Emit any header bytes the format needs (CSV header row,
opening
[ for the JSON array). Must be called exactly once
before any write_row.Source§fn write_row(&mut self, row: &Row) -> Result<(), Error>
fn write_row(&mut self, row: &Row) -> Result<(), Error>
Write one row. The encoder pulls column names from the row’s
Row::iter_named iterator — they must align with the
columns passed to Self::begin, in the same order, for CSV.Source§fn write_named_row(
&mut self,
columns: &[(String, LoraValue)],
) -> Result<(), Error>
fn write_named_row( &mut self, columns: &[(String, LoraValue)], ) -> Result<(), Error>
Write the same shape as
Self::write_row from a flat
(name, value) slice. Used by encoders that consume rows
from outside the engine (testing, replay).Auto Trait Implementations§
impl<W> Freeze for JsonArrayEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for JsonArrayEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for JsonArrayEncoder<W>where
W: Send,
impl<W> Sync for JsonArrayEncoder<W>where
W: Sync,
impl<W> Unpin for JsonArrayEncoder<W>where
W: Unpin,
impl<W> UnsafeUnpin for JsonArrayEncoder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for JsonArrayEncoder<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more