Enum juniper::InputValue [] [src]

pub enum InputValue {
    Null,
    Int(i32),
    Float(f64),
    String(String),
    Boolean(bool),
    Enum(String),
    Variable(String),
    List(Vec<Spanning<InputValue>>),
    Object(Vec<(Spanning<String>, Spanning<InputValue>)>),
}

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

Methods

impl InputValue
[src]

[src]

Construct a null value.

[src]

Construct an integer value.

[src]

Construct a floating point value.

[src]

Construct a boolean value.

[src]

Construct a string value.

[src]

Construct an enum value.

[src]

Construct a variable value.

[src]

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.

[src]

Construct a located list.

[src]

Construct an unlocated object.

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

[src]

Construct a located object.

[src]

Resolve all variables to their values.

[src]

Shorthand form of invoking FromInputValue::from().

[src]

Does the value represent null?

[src]

Does the value represent a variable?

[src]

View the underlying enum value, if present.

[src]

View the underlying int value, if present.

[src]

View the underlying float value, if present.

[src]

View the underlying string value, if present.

[src]

Convert the input value to an unlocated object value.

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

[src]

Convert the input value to an unlocated list value.

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

[src]

Recursively find all variables

[src]

Compare equality with another InputValue ignoring any source position information.

Trait Implementations

impl Clone for InputValue
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for InputValue
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for InputValue
[src]

[src]

Formats the value using the given formatter.

impl Display for InputValue
[src]

[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for InputValue
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for InputValue
[src]

[src]

Serialize this value into the given Serde serializer. Read more