Enum juniper::InputValue[][src]

pub enum InputValue<S = DefaultScalarValue> {
    Null,
    Scalar(S),
    Enum(String),
    Variable(String),
    List(Vec<Spanning<InputValue<S>>>),
    Object(Vec<(Spanning<String>, Spanning<InputValue<S>>)>),
}
Expand description

A JSON-like value that can be passed into the query execution, either out-of-band, or in-band as default variable values. These are not constant and might contain variables.

Lists and objects variants are spanned, i.e. they contain a reference to their position in the source file, if available.

Variants

Null
Scalar(S)
Enum(String)
Variable(String)

Implementations

Construct a null value.

👎 Deprecated since 0.11.0:

Use InputValue::scalar instead

Construct an integer value.

👎 Deprecated since 0.11.0:

Use InputValue::scalar instead

Construct a floating point value.

👎 Deprecated since 0.11.0:

Use InputValue::scalar instead

Construct a boolean value.

👎 Deprecated since 0.11.0:

Use InputValue::scalar instead

Construct a string value.

Construct a scalar value

Construct an enum value.

Construct a variable value.

Construct an unlocated list.

Convenience function to make each InputValue in the input vector not contain any location information. Can be used from ToInputValue implementations, where no source code position information is available.

Construct a located list.

Construct an unlocated object.

Similar to InputValue::list, it makes each key and value in the given hash map not contain any location information.

Construct a located object.

Resolve all variables to their values.

Shorthand form of invoking FromInputValue::from().

Does the value represent null?

Does the value represent a variable?

View the underlying enum value, if present.

View the underlying int value, if present.

View the underlying float value, if present.

View the underlying string value, if present.

View the underlying scalar value, if present.

View the underlying scalar value, if present.

Convert the input value to an unlocated object value.

This constructs a new IndexMap that contain references to the keys and values in self.

Convert the input value to an unlocated list value.

This constructs a new vector that contain references to the values in self.

Recursively find all variables

Compare equality with another InputValue ignoring any source position information.

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

Deserialize this value from the given Serde deserializer. 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 !=.

Serialize this value into the given Serde serializer. Read more

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

Converts the given value to a String. 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.