Trait DataEncoder

Source
pub trait DataEncoder:
    Serialize
    + DeserializeOwned
    + Clone
    + Send
    + Sync
    + Debug
    + Sized {
    // Provided methods
    fn data_parser() -> DataParser { ... }
    fn encode_json(&self) -> Result<Vec<u8>, DataParserError> { ... }
    fn decode_json(encoded: &[u8]) -> Result<Self, DataParserError> { ... }
    fn to_json_value(&self) -> Result<Value, DataParserError> { ... }
}

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§