Module allow_null
Expand description
Serialize/deserialize nil
able value into T
, where nil
turns into the Default
value.
Serialize any value of T
, including the default value,
using the serialization for Some
variant of Option<T>
.
This helper can be used to tolerate nil
values from a serialization producer,
while the default value is normatively serialized as such.
Functionsยง
- Deserialize
T
from anil
-able representation, accepting thenil
- Serialize
T
asSome
value ofOption<T>
.