Enum generic_json::ValueMut [−][src]
pub enum ValueMut<'a, T: Json> {
Null,
Boolean(bool),
Number(&'a mut T::Number),
String(&'a mut T::String),
Array(&'a mut T::Array),
Object(&'a mut T::Object),
}
Expand description
Mutable JSON value reference.
Variants
Boolean(bool)
Tuple Fields of Boolean
0: bool
Number(&'a mut T::Number)
Tuple Fields of Number
0: &'a mut T::Number
String(&'a mut T::String)
Tuple Fields of String
0: &'a mut T::String
Array(&'a mut T::Array)
Tuple Fields of Array
0: &'a mut T::Array
Object(&'a mut T::Object)
Tuple Fields of Object
0: &'a mut T::Object
Implementations
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 this number as an u32
if it can be exactly represented as such.
Returns this number as an u64
if it can be exactly represented as such.
Returns this number as an i32
if it can be exactly represented as such.
Returns this number as an i64
if it can be exactly represented as such.
Returns this number as an f32
if it can be exactly represented as such.
Returns this number as an f32
if it is a number, potentially losing precision in the process.
Returns this number as an f64
if it can be exactly represented as such.
Returns this number as an f64
if it is a number, potentially losing precision in the process.
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 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 array, returns a reference to it.
Returns None
otherwise.
If the value is an object, returns a reference to it.
Returns None
otherwise.
If the value is an object, returns a reference to it.
Returns None
otherwise.
If the value is an array, returns a mutable reference to it.
Returns None
otherwise.
If the value is an array, returns a mutable reference to it.
Returns None
otherwise.
If the value is an object, returns a mutable reference to it.
Returns None
otherwise.
If the value is an object, returns a mutable reference to it.
Returns None
otherwise.