pub struct Json4Codec;Expand description
JSON v4 wire format codec (application/json).
Uses _kind discriminator for type-tagged values.
Trait Implementations§
Source§impl Codec for Json4Codec
impl Codec for Json4Codec
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.
Auto Trait Implementations§
impl Freeze for Json4Codec
impl RefUnwindSafe for Json4Codec
impl Send for Json4Codec
impl Sync for Json4Codec
impl Unpin for Json4Codec
impl UnsafeUnpin for Json4Codec
impl UnwindSafe for Json4Codec
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> 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