Enum ijson::DestructuredRef[][src]

pub enum DestructuredRef<'a> {
    Null,
    Bool(bool),
    Number(&'a INumber),
    String(&'a IString),
    Array(&'a IArray),
    Object(&'a IObject),
}
Expand description

Enum returned by IValue::destructure_ref to allow matching on the type of a reference to an IValue.

Variants

Null

Null.

Bool(bool)

Boolean. IValues do not directly contain booleans, so the value is returned directly instead of as a reference.

Tuple Fields of Bool

0: bool
Number(&'a INumber)

Number.

Tuple Fields of Number

0: &'a INumber
String(&'a IString)

String.

Tuple Fields of String

0: &'a IString
Array(&'a IArray)

Array.

Tuple Fields of Array

0: &'a IArray
Object(&'a IObject)

Object.

Tuple Fields of Object

0: &'a IObject

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.