[][src]Module sval::serde

Integration between sval and serde.

Add the serde feature to your Cargo.toml to enable this module:

[dependencies.sval]
features = ["serde"]

From sval to serde

A type that implements sval::Value can be converted into a type that implements serde::Serialize:

let my_serialize = sval::serde::to_serialize(my_value);

From serde to sval

A type that implements serde::Serialize can be converted into a type that implements sval::Value:

let my_value = sval::serde::to_value(my_serialize);

Functions

serialize

Serialize a Value using the given Serializer.

stream

Stream a Serialize using the given Stream.

to_serialize

Convert a Value into a Serialize.

to_value

Convert a Serialize into a Value.