Enum generic_json::ValueRef [−][src]
pub enum ValueRef<'a, T: Json> {
Null,
Boolean(bool),
Number(&'a T::Number),
String(&'a str),
Array(&'a T::Array),
Object(&'a T::Object),
}Expand description
JSON value reference.
Variants
Boolean(bool)Tuple Fields of Boolean
0: boolNumber(&'a T::Number)Tuple Fields of Number
0: &'a T::NumberString(&'a str)Tuple Fields of String
0: &'a strArray(&'a T::Array)Tuple Fields of Array
0: &'a T::ArrayObject(&'a T::Object)Tuple Fields of Object
0: &'a T::ObjectImplementations
Returns true if the value is a boolean. Returns false otherwise.
For any value on which is_boolean returns true,
as_bool is guaranteed to return the boolean value.
Returns true if the value is a number. Returns false otherwise.
For any value on which is_number returns true,
as_number is guaranteed to return the number value.
Returns true if the value is a string.
Returns false otherwise.
For any value on which is_string returns true,
as_str is guaranteed to return the string value.
Returns true if the value is an array.
Returns false otherwise.
For any value on which is_array returns true,
as_array is guaranteed to return the array value.
If the value is a boolean, returns the associated bool.
Returns None otherwise.
If the value is a number, returns a reference to it.
Returns None otherwise.
If the value is a string, returns its associated str.
Returns None otherwise.
If the value is an array, returns a reference to it.
Returns None otherwise.
If the value is an object, returns a reference to it.
Returns None otherwise.