@@ -28,7 +28,8 @@ from_integer! {
2828}
2929
3030impl From < f32 > for Value {
31- /// Convert 32-bit floating point number to `Value`
31+ /// Convert 32-bit floating point number to `Value::Number`, or
32+ /// `Value::Null` if infinite or NaN.
3233 ///
3334 /// # Examples
3435 ///
@@ -44,7 +45,8 @@ impl From<f32> for Value {
4445}
4546
4647impl From < f64 > for Value {
47- /// Convert 64-bit floating point number to `Value`
48+ /// Convert 64-bit floating point number to `Value::Number`, or
49+ /// `Value::Null` if infinite or NaN.
4850 ///
4951 /// # Examples
5052 ///
@@ -60,7 +62,7 @@ impl From<f64> for Value {
6062}
6163
6264impl From < bool > for Value {
63- /// Convert boolean to `Value`
65+ /// Convert boolean to `Value::Bool`.
6466 ///
6567 /// # Examples
6668 ///
@@ -76,7 +78,7 @@ impl From<bool> for Value {
7678}
7779
7880impl From < String > for Value {
79- /// Convert `String` to `Value`
81+ /// Convert `String` to `Value::String`.
8082 ///
8183 /// # Examples
8284 ///
@@ -92,7 +94,7 @@ impl From<String> for Value {
9294}
9395
9496impl From < & str > for Value {
95- /// Convert string slice to `Value`
97+ /// Convert string slice to `Value::String`.
9698 ///
9799 /// # Examples
98100 ///
@@ -108,7 +110,7 @@ impl From<&str> for Value {
108110}
109111
110112impl < ' a > From < Cow < ' a , str > > for Value {
111- /// Convert copy-on-write string to `Value`
113+ /// Convert copy-on-write string to `Value::String`.
112114 ///
113115 /// # Examples
114116 ///
@@ -133,7 +135,7 @@ impl<'a> From<Cow<'a, str>> for Value {
133135}
134136
135137impl From < Number > for Value {
136- /// Convert `Number` to `Value`
138+ /// Convert `Number` to `Value::Number`.
137139 ///
138140 /// # Examples
139141 ///
@@ -149,7 +151,7 @@ impl From<Number> for Value {
149151}
150152
151153impl From < Map < String , Value > > for Value {
152- /// Convert map (with string keys) to `Value`
154+ /// Convert map (with string keys) to `Value::Object`.
153155 ///
154156 /// # Examples
155157 ///
@@ -166,7 +168,7 @@ impl From<Map<String, Value>> for Value {
166168}
167169
168170impl < T : Into < Value > > From < Vec < T > > for Value {
169- /// Convert a `Vec` to `Value`
171+ /// Convert a `Vec` to `Value::Array`.
170172 ///
171173 /// # Examples
172174 ///
@@ -182,7 +184,7 @@ impl<T: Into<Value>> From<Vec<T>> for Value {
182184}
183185
184186impl < T : Clone + Into < Value > > From < & [ T ] > for Value {
185- /// Convert a slice to `Value`
187+ /// Convert a slice to `Value::Array`.
186188 ///
187189 /// # Examples
188190 ///
@@ -198,7 +200,7 @@ impl<T: Clone + Into<Value>> From<&[T]> for Value {
198200}
199201
200202impl < T : Into < Value > > FromIterator < T > for Value {
201- /// Convert an iterable type to a `Value`
203+ /// Create a `Value::Array` by collecting an iterator of array elements.
202204 ///
203205 /// # Examples
204206 ///
@@ -228,7 +230,7 @@ impl<T: Into<Value>> FromIterator<T> for Value {
228230}
229231
230232impl < K : Into < String > , V : Into < Value > > FromIterator < ( K , V ) > for Value {
231- /// Convert an iterable type to a `Value`
233+ /// Create a `Value::Object` by collecting an iterator of key-value pairs.
232234 ///
233235 /// # Examples
234236 ///
@@ -248,7 +250,7 @@ impl<K: Into<String>, V: Into<Value>> FromIterator<(K, V)> for Value {
248250}
249251
250252impl From < ( ) > for Value {
251- /// Convert `()` to `Value`
253+ /// Convert `()` to `Value::Null`.
252254 ///
253255 /// # Examples
254256 ///
0 commit comments