JsonCodec

Trait JsonCodec 

Source
pub trait JsonCodec<T> {
    // Provided methods
    fn encode_json(&self) -> Map<String, Value> { ... }
    fn decode_json(_obj: &Map<String, Value>) -> BuckyResult<T> { ... }
    fn encode_string(&self) -> String { ... }
    fn decode_string(value: &str) -> BuckyResult<T> { ... }
    fn decode_value(value: &Value) -> BuckyResult<T> { ... }
    fn encode_value(&self) -> Value { ... }
}

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.

Implementations on Foreign Types§

Source§

impl JsonCodec<Vec<ObjectMapContentItem>> for Vec<ObjectMapContentItem>

Implementors§