Module serde_with::rust::sets_first_value_wins [−][src]
Ensure that the first value is taken, if duplicate values exist
By default serde has a last-value-wins implementation, if duplicate keys for a set exist. Sometimes the opposite strategy is desired. This helper implements a first-value-wins strategy.
The implementation supports both the HashSet
and the BTreeSet
from the standard library.
Functions
deserialize | Deserialize a set and return an error on duplicate values |