7 releases
| 0.1.6 | Jun 26, 2025 |
|---|---|
| 0.1.5 | Jun 25, 2025 |
| 0.1.4 | May 20, 2025 |
| 0.1.2 | Jan 22, 2025 |
#67 in #content
57 downloads per month
Used in 3 crates
(2 directly)
8KB
185 lines
MaybeMultiple
This is a utility crate that establishes an enum to use in place of Option where the content may be singular, multiple (a Vec) or None. It is particularly useful in situations where a JSON object is being deserialized and may take these types of forms:
"https://example.com/id/uuid"
["https://example.com/id/uuid1", "https://example.com/id/uuid2"]
null
These would all match to MaybeMultiple as ::Single, ::Multiple, ::None, respectively.
Dependencies
~2.7–5MB
~88K SLoC