pub trait SharedJson: Sized {
// Required methods
fn encode_json_with_context(
&self,
context: &SharedValueContext,
) -> Result<Value>;
fn decode_json_with_context(
value: Value,
context: &SharedValueContext,
) -> Result<Self>;
}Expand description
Contextual JSON serialization generated for explicitly shared fields.
Required Methods§
fn encode_json_with_context( &self, context: &SharedValueContext, ) -> Result<Value>
fn decode_json_with_context( value: Value, context: &SharedValueContext, ) -> Result<Self>
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.