Enum generic_json::ValueMut[][src]

pub enum ValueMut<'a, T: Json> {
    Null,
    Boolean(&'a mut 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

Null
Boolean(&'a mut bool)

Tuple Fields of Boolean

0: &'a mut 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 Null. Returns false otherwise.

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.

Returns true if the value is an object. Returns false otherwise.

For any value on which is_object returns true, as_object is guaranteed to return the object 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.

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.

Creates a new value by cloning the referenced value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.