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
Enum(String)
Variable(String)
List(Vec<Spanning<InputValue<S>>>)
Implementations
👎 Deprecated since 0.11.0: Use InputValue::scalar
instead
Use InputValue::scalar
instead
Construct an integer value.
👎 Deprecated since 0.11.0: Use InputValue::scalar
instead
Use InputValue::scalar
instead
Construct a floating point value.
👎 Deprecated since 0.11.0: Use InputValue::scalar
instead
Use InputValue::scalar
instead
Construct a boolean value.
👎 Deprecated since 0.11.0: Use InputValue::scalar
instead
Use InputValue::scalar
instead
Construct a string value.
Construct an enum 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 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.
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
fn deserialize<D>(deserializer: D) -> Result<InputValue<S>, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<InputValue<S>, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. 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
impl<S> RefUnwindSafe for InputValue<S> where
S: RefUnwindSafe,
impl<S> Send for InputValue<S> where
S: Send,
impl<S> Sync for InputValue<S> where
S: Sync,
impl<S> Unpin for InputValue<S> where
S: Unpin,
impl<S> UnwindSafe for InputValue<S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V