1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[]
= "serde-this-or-that"
= "0.4.2"
= ["Ritvik Nag <rv.kvetch@gmail.com>"]
= "Custom deserialization for fields that can be specified as multiple types."
= "https://docs.rs/serde-this-or-that"
= "https://github.com/rnag/serde-this-or-that"
= "README.md"
= ["serde",
# I would have liked to add the below keyword, but of course
# crates.io has a limit of 5 keywords, so well.. that's that. :\
# "utilities",
# And now surprisingly, I found this keyword to be super useful!
# I'm actually partially shocked that crates.io doesn't use the
# crate name to automagically satisfy user search requests.
"this-or-that",
# Of course, the rest that follow are also pretty solid too.
"deserialization",
"visitor",
"multiple-type"]
= ["encoding"]
= "MIT"
= "2021"
# Exclude the `examples/` and `benches/` folders when publishing the crate,
# as these can always be found on the project repo on GitHub.
# See also: https://users.rust-lang.org/t/what-to-include-when-publishing-a-crate/51992
= [".github/", ".gitignore", "benches/", "examples/"]
# See here for more info: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
[]
= true
= ["x86_64-unknown-linux-gnu"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[]
# No `derive` features necessary, just the stock `serde` by itself :-)
= "1.0.136"
[]
# We'll need the `derive` feature for examples and tests.
= { = "^1", = ["derive"] }
# And don't forget `serde-json`.
= "^1"
# This one's for running benchmarks, with `cargo bench`.
= { = "0.3.5", = ["html_reports"] }
# serde_with: used for a baseline comparison in the benchmarks.
= "1.12.1"
# Here we have our logging utilities, mainly for use in examples.
= "^0.4"
= "0.2.0"
# version_sync: to ensure versions in `Cargo.toml` and `README.md` are in sync
= "0.9.4"
# cargo-bump: to bump package version and tag a commit at the same time.
# actually, the docs recommend installing this globally:
# $ git clone https://github.com/rnag/cargo-bump && cd cargo-bump && cargo install --path . && cd .. && rm -rf cargo-bump
### FEATURES #################################################################
[]
# Enable nothing by default.
= []
# The `derive` feature can be enabled when adding the dependency, and then
# it can be used like, e.g.:
# use serde_this_or_that::Deserialize;
# Note, this requires that a project's `Cargo.toml` be updated as follows:
# serde-this-or-that = { version = "*", features = ["derive"] }
= ["serde/derive"]
[[]]
= "as_u64"
= false
= "benches/as_u64.rs"
[[]]
= "as_bool"
= false
= "benches/as_bool.rs"
[[]]
= "serde_with"
= false
= "benches/serde_with.rs"