pub trait AnySerializableVec: AnyReadableVec {
// Required methods
fn write_json(
&self,
from: Option<usize>,
to: Option<usize>,
buf: &mut Vec<u8>,
) -> Result<()>;
fn write_json_value(
&self,
from: Option<usize>,
buf: &mut Vec<u8>,
) -> Result<()>;
fn last_json_value(&self) -> Option<Value>;
fn write_csv_column(
&self,
from: Option<usize>,
to: Option<usize>,
buf: &mut String,
) -> Result<()>;
}Expand description
Type-erased trait for serializable vectors.
Required Methods§
Sourcefn write_json(
&self,
from: Option<usize>,
to: Option<usize>,
buf: &mut Vec<u8>,
) -> Result<()>
fn write_json( &self, from: Option<usize>, to: Option<usize>, buf: &mut Vec<u8>, ) -> Result<()>
Write JSON array to output buffer
Sourcefn write_json_value(&self, from: Option<usize>, buf: &mut Vec<u8>) -> Result<()>
fn write_json_value(&self, from: Option<usize>, buf: &mut Vec<u8>) -> Result<()>
Write single JSON value to output buffer (first value in range)
Sourcefn last_json_value(&self) -> Option<Value>
fn last_json_value(&self) -> Option<Value>
Return the last value as a serde_json::Value, or None if empty
Implementors§
impl<V> AnySerializableVec for V
Available on crate feature
serde only.