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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
//! This crate contains the [`OhMyToml`] derive macro
//!
//! # Attributes
//!
//! ## Field attributes
//!
//! - `default` or `default = value`: If the field is missing then the default value for the field will be used
//! - `on_default = "error"`: If the `default` value is used, then an error will be reported -
//! but we still get our data. This allows for error recovery.
//! - `rename = "..."`: Renames this field. When checking for keys in the TOML, we will expect the renamed value.
//!
//! ## Container attributes
//!
//! - `default_all`: Applies `default` to each field
//! - To opt-out for a single field, use `require`
//! - `on_default_all = "error"`: Applies `on_default = "error"` to each field
//! - To opt-out for a single field, use `on_default = "ok"` on the field
//! - `rename_all = "..."`: Renames all fields to use a different case. Available cases are:
//! - `"lowercase"`
//! - `"UPPERCASE"`
//! - `"PascalCase"`
//! - `"camelCase"`
//! - `"snake_case"`
//! - `"SCREAMING_SNAKE_CASE"`
//! - `"kebab-case"`
//! - `"SCREAMING-KEBAB-CASE"`
//! - `"Train-Case"`
//! - `"Title Case"`
//!
//! # Implementations
//!
//! The [`DeserializeItem`] and [`DeserializeValue`] are
//! implemented for the following types:
//!
//! # Implementations provided
//!
//! - **Primitive types:**
//! - [`bool`]
//! - [`i8`], [`i16`], [`i32`], [`i64`], [`i128`]
//! - [`u8`], [`u16`], [`u32`], [`u64`], [`u128`]
//! - [`isize`], [`usize`]
//! - [`f32`], [`f64`]
//! - [`char`]
//! - **Non-zero types:**
//! - [`NonZeroI8`](std::num::NonZeroI8), [`NonZeroI16`](std::num::NonZeroI16), [`NonZeroI32`](std::num::NonZeroI32), [`NonZeroI64`](std::num::NonZeroI64), [`NonZeroI128`](std::num::NonZeroI128)
//! - [`NonZeroU8`](std::num::NonZeroU8), [`NonZeroU16`](std::num::NonZeroU16), [`NonZeroU32`](std::num::NonZeroU32), [`NonZeroU64`](std::num::NonZeroU64), [`NonZeroU128`](std::num::NonZeroU128)
//! - [`NonZeroIsize`](std::num::NonZeroIsize), [`NonZeroUsize`](std::num::NonZeroUsize)
//! - **Atomic types:**
//! - [`AtomicBool`](std::sync::atomic::AtomicBool)
//! - [`AtomicI8`](std::sync::atomic::AtomicI8), [`AtomicI16`](std::sync::atomic::AtomicI16), [`AtomicI32`](std::sync::atomic::AtomicI32), [`AtomicI64`](std::sync::atomic::AtomicI64)
//! - [`AtomicU8`](std::sync::atomic::AtomicU8), [`AtomicU16`](std::sync::atomic::AtomicU16), [`AtomicU32`](std::sync::atomic::AtomicU32), [`AtomicU64`](std::sync::atomic::AtomicU64)
//! - [`AtomicIsize`](std::sync::atomic::AtomicIsize), [`AtomicUsize`](std::sync::atomic::AtomicUsize)
//! - **Miscellaneous types:**
//! - Tuples up to size 16
//! - [`PhantomData`](core::marker::PhantomData)
//! - **Collections:**
//! - Arrays of any size `[T; N]`
//! - [`BTreeSet<T>`](std::collections::BTreeSet)
//! - [`BTreeMap<String, T>`](std::collections::BTreeMap)
//! - [`BinaryHeap<T>`](std::collections::BinaryHeap)
//! - [`LinkedList<T>`](std::collections::LinkedList)
//! - [`Vec<T>`](std::vec::Vec)
//! - [`VecDeque<T>`](std::collections::VecDeque)
//! - [`HashSet<T>`](std::collections::HashSet)
//! - [`HashMap<String, T>`](std::collections::HashMap)
//! - [`NonEmpty<T>`](nonempty::NonEmpty) since we use it in the public API
//! - **Network types:**
//! - [`IpAddr`](std::net::IpAddr)
//! - [`Ipv4Addr`](std::net::Ipv4Addr)
//! - [`Ipv6Addr`](std::net::Ipv6Addr)
//! - [`SocketAddr`](std::net::SocketAddr)
//! - [`SocketAddrV4`](std::net::SocketAddrV4)
//! - [`SocketAddrV6`](std::net::SocketAddrV6)
//! - **Strings:**
//! - [`String`]
//! - [`PathBuf`](std::path::PathBuf)
//! - [`CString`](std::ffi::CString)
//! - [`OsString`](std::ffi::OsString)
//! - **Unprocessed types:**
//! - [`Value`](toml_edit::Value)
//! - [`Item`](toml_edit::Item)
//! - [`Datetime`](toml_edit::Datetime)
//! - [`Array`](toml_edit::Array)
//! - [`InlineTable`](toml_edit::InlineTable)
//! - [`ArrayOfTables`](toml_edit::ArrayOfTables)
//! - [`Table`](toml_edit::InlineTable)
//!
//! Additionally, we provide [`Spanned<T>`] which allows you to wrap any type that can be deserialized from TOML
//! to obtain its [`SourceSpan`](miette::SourceSpan) that represents the location of the type in the TOML
//! file itself - to use as you please.
pub use ;
pub use ;
pub use Spanned;
/// The `Key` in a `Key <=> Value` pair
/// Value
pub type Value<'a> = Spanned;
pub use miette;
pub use nonempty;
pub use strsim;
pub use thiserror;
pub use toml;
/// Built-in deserialization errors for specific types
///
/// All of these errors implement the [`Error`] trait
pub use __internal_remove_attributes;