JsonTransformer

Trait JsonTransformer 

Source
pub trait JsonTransformer:
    Send
    + Sync
    + Clone
    + 'static {
    // Required method
    fn transform(&self, v: Value) -> Value;
}
Expand description

Transform a serde_json::Value. Implements HttpResponder by assuming the Response<Body> is json-formatted.

Required Methods§

Source

fn transform(&self, v: Value) -> Value

Transform a serde_json::Value

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§

Source§

impl<F> JsonTransformer for F
where F: Fn(Value) -> Value + Send + Sync + Clone + 'static,