pub struct Json3Codec;Expand description
JSON v3 wire format codec (application/json;v=3).
Uses type-prefix strings for scalars (e.g., "m:", "n:72 °F", "s:text").
Trait Implementations§
Source§impl Codec for Json3Codec
impl Codec for Json3Codec
Source§fn encode_grid(&self, grid: &HGrid) -> Result<String, CodecError>
fn encode_grid(&self, grid: &HGrid) -> Result<String, CodecError>
Encode an HGrid to a string.
Source§fn decode_grid(&self, input: &str) -> Result<HGrid, CodecError>
fn decode_grid(&self, input: &str) -> Result<HGrid, CodecError>
Decode a string to an HGrid.
Source§fn encode_scalar(&self, val: &Kind) -> Result<String, CodecError>
fn encode_scalar(&self, val: &Kind) -> Result<String, CodecError>
Encode a single scalar Kind value to a string.
Source§fn decode_scalar(&self, input: &str) -> Result<Kind, CodecError>
fn decode_scalar(&self, input: &str) -> Result<Kind, CodecError>
Decode a string to a single scalar Kind value.
Source§fn encode_grid_header(&self, grid: &HGrid) -> Result<Vec<u8>, CodecError>
fn encode_grid_header(&self, grid: &HGrid) -> Result<Vec<u8>, CodecError>
Encode the grid header (version line + meta + column definitions). Read more
Source§fn encode_grid_row(
&self,
_cols: &[HCol],
_row: &HDict,
) -> Result<Vec<u8>, CodecError>
fn encode_grid_row( &self, _cols: &[HCol], _row: &HDict, ) -> Result<Vec<u8>, CodecError>
Encode a single grid row given the column definitions. Read more
Auto Trait Implementations§
impl Freeze for Json3Codec
impl RefUnwindSafe for Json3Codec
impl Send for Json3Codec
impl Sync for Json3Codec
impl Unpin for Json3Codec
impl UnsafeUnpin for Json3Codec
impl UnwindSafe for Json3Codec
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