@@ -229,7 +229,7 @@ impl RawValue {
229
229
}
230
230
231
231
/// Returns the kind of JSON value contained within.
232
- fn kind ( & self ) -> RawKind {
232
+ pub fn kind ( & self ) -> RawKind {
233
233
let first = self
234
234
. json
235
235
. as_bytes ( )
@@ -238,7 +238,7 @@ impl RawValue {
238
238
239
239
// `RawValue` has whitespace stripped so we know the first char is non-whitespace.
240
240
// `RawValue` is also valid JSON so the only possible set of chars that can come next
241
- // are `[0-9]` or `[-fnt"[{]`.
241
+ // are `[0-9]` or `[-pub fnt"[{]`.
242
242
match * first {
243
243
b'n' => RawKind :: Null ,
244
244
b't' | b'f' => RawKind :: Bool ,
@@ -264,7 +264,7 @@ impl RawValue {
264
264
/// // The boolean `false` is not null.
265
265
/// assert!(!v["b"].is_null());
266
266
/// ```
267
- fn is_null ( & self ) -> bool {
267
+ pub fn is_null ( & self ) -> bool {
268
268
matches ! ( self . kind( ) , RawKind :: Null )
269
269
}
270
270
@@ -281,7 +281,7 @@ impl RawValue {
281
281
/// // The string `"false"` is a string, not a boolean.
282
282
/// assert!(!v["b"].is_boolean());
283
283
/// ```
284
- fn is_boolean ( & self ) -> bool {
284
+ pub fn is_boolean ( & self ) -> bool {
285
285
matches ! ( self . kind( ) , RawKind :: Bool )
286
286
}
287
287
@@ -298,7 +298,7 @@ impl RawValue {
298
298
/// // The string `"2"` is a string, not a number.
299
299
/// assert!(!v["b"].is_number());
300
300
/// ```
301
- fn is_number ( & self ) -> bool {
301
+ pub fn is_number ( & self ) -> bool {
302
302
matches ! ( self . kind( ) , RawKind :: Number )
303
303
}
304
304
@@ -315,7 +315,7 @@ impl RawValue {
315
315
/// // The boolean `false` is not a string.
316
316
/// assert!(!v["b"].is_string());
317
317
/// ```
318
- fn is_string ( & self ) -> bool {
318
+ pub fn is_string ( & self ) -> bool {
319
319
matches ! ( self . kind( ) , RawKind :: String )
320
320
}
321
321
@@ -332,7 +332,7 @@ impl RawValue {
332
332
/// // an object, not an array
333
333
/// assert!(!obj["b"].is_array());
334
334
/// ```
335
- fn is_array ( & self ) -> bool {
335
+ pub fn is_array ( & self ) -> bool {
336
336
matches ! ( self . kind( ) , RawKind :: Array )
337
337
}
338
338
@@ -350,7 +350,7 @@ impl RawValue {
350
350
/// // array, not an object
351
351
/// assert!(!obj["b"].is_object());
352
352
/// ```
353
- fn is_object ( & self ) -> bool {
353
+ pub fn is_object ( & self ) -> bool {
354
354
matches ! ( self . kind( ) , RawKind :: Object )
355
355
}
356
356
}
0 commit comments