Skip to main content

DynSerializer

Type Alias DynSerializer 

Source
pub type DynSerializer<O> = Box<dyn Fn(&O) -> Result<Value> + 'static>;
Expand description

Erased serializer used by TestValue<T> to persist values in test vectors.

Implemented by default via serde_json::to_value, but can be customized per field through #[test_vec(serialize_with = "path::to::fn")].

Aliased Typeยง

pub struct DynSerializer<O>(/* private fields */);