Module none_as_empty_string

Module none_as_empty_string 

Source
Expand description

Serialize and deserialize Option<T> as empty string if it is None. This is useful to:

  • Demonstrate config entries whose default values are None in example.toml
  • Allow users to override a config entry that’s already set to Some back to None in per-job configuration via ALTER .. SET CONFIG

Note that using this utility on a String should be carefully considered, as it will confuse explicit empty string and None.

Functions§

deserialize
serialize