Skip to content

Commit

Permalink
Add information about this new SingletonMap API.
Browse files Browse the repository at this point in the history
This is because I'm still not a 100% sure that this API is the right
one. AFAIK, this is okay, but I would like more time to think about it.

However, I don't mind having this solution for now. It might end up in
`serde-yaml-ng` 1.0, it might not.
  • Loading branch information
acatton committed May 26, 2024
1 parent 0ec82b4 commit ab4f4df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ pub mod singleton_map {
T::deserialize(SingletonMap::new(deserializer))
}

/// <div class="warning">This is an new API which is not present in the original <a
/// href="https://github.com/dtolnay/serde-yaml"><code>serde-yaml</code></a>. <strong>This API
/// is not garanteed to be present in <code>serde-yaml-ng</code> version 1.0.</strong> However,
/// this API won't be removed without an acceptable alternative solution for the problem it is
/// trying to solve.</div>
///
/// Can be used for serialing/deserializing an enum using a YAML map containing one entry in
/// which the key identifies the variant name.
///
Expand Down

0 comments on commit ab4f4df

Please sign in to comment.