pub trait Codec<T> {
// Required methods
fn encode(&self, value: &T) -> JsonCodecResult<Vec<u8>>;
fn decode(&self, bytes: &[u8]) -> JsonCodecResult<T>;
}Expand description
Typed byte codec for D82 storage binding helpers and D96 JSON surfaces.
Required Methods§
Sourcefn decode(&self, bytes: &[u8]) -> JsonCodecResult<T>
fn decode(&self, bytes: &[u8]) -> JsonCodecResult<T>
Updates or reads decode.