atomicallyEncodeTo

Serializes given value into a valid TOML document and writes it to a temporary file in the same directory as the file indicated by path. The file will then be synced to disk, and finally moved to its final destination, atomically replacing any pre-existing file in that location.

Use this if you intend to update a potentially pre-existing config file with new values.

If value does not serialize to a valid TOML document (i.e. a map of zero or more keys), an TomlException.SerializationError is thrown.