pub trait AsJson<J: JsonClone, K: JsonFrom<J>> {
    fn as_json_with(
        &self,
        meta: impl Clone + Fn(Option<&J::MetaData>) -> K::MetaData
    ) -> K; fn as_json(&self) -> K
    where
        K::MetaData: Default
, { ... } }
Expand description

Type composed of J JSON values that can be converted into a K JSON value.

Required methods

Converts this value into a K JSON value using the given meta function to convert J::MetaData into K::MetaData.

Provided methods

Converts this value into a K JSON value.

The K value is annotated with the default value of K::MetaData.

Implementations on Foreign Types

Implementors