pub fn input<T: serde::de::DeserializeOwned>(&self) -> Result<T, Error> {
        let json_value: serde_json::Value = self
            .args()
            .get::<Value>("input")
            .ok_or_else(|| Error::InputItemNotFound {
                name: "input".to_string(),
            })
            .and_then(serde_json::Value::try_from)
            .map_err(|_| Error::TypeConversionFailed {
                src: "warpgrapher::Value".to_string(),
                dst: "serde_json::Value".to_string(),
            })?;
        let parsed_input: T = serde_json::from_value(json_value)
            .map_err(|e| Error::JsonDeserializationFailed { source: e })?;
        Ok(parsed_input)
    }
/// Returns the resolver input deserialized into a structure of type T that
/// implements the serde `Deserialize` trait.
///
/// # Errors
///
/// Returns an [`Error]` variant [`InputItemNotFound`] if no input field was passed
/// to the query, [`TypeConversionFailed`] if unable to convert a [`Value`]
/// to a serde_json Value, and [`JsonDeserializationFailed`] if unable to parse the
/// input data into a struct of type T.
///
/// [`Error`]: ../../error/enum.Error.html
/// [`InputItemNotFound`]: ../../error/enum.Error.html#variant.InputItemNotFound
/// [`TypeConversionFailed`]: ../../error/enum.Error.html#variant.TypeConversionFailed
/// [`JsonDeserializationFailed`]: ../../error/enum.Error.html#variant.JsonDeserializationFailed
/// [`Value`]: ../value/enum.Value.html
Returns the resolver input deserialized into a structure of type T that
implements the serde `Deserialize` trait.
Returns the resolver input deserialized into a structure of type T that implements the serde ` Deserialize ` trait .
pub fn input<T: serde::de::DeserializeOwned>(&self) -> Result<T, Error> {
        let json_value: serde_json::Value = self
            .args()
            .get::<Value>("input")
            .ok_or_else(|| Error::InputItemNotFound {
                name: "input".to_string(),
            })
            .and_then(serde_json::Value::try_from)
            .map_err(|_| Error::TypeConversionFailed {
                src: "warpgrapher::Value".to_string(),
                dst: "serde_json::Value".to_string(),
            })?;
        let parsed_input: T = serde_json::from_value(json_value)
            .map_err(|e| Error::JsonDeserializationFailed { source: e })?;
        Ok(parsed_input)
    }
pub fn input < T : serde :: de :: DeserializeOwned > ( & self ) -> Result < T , Error > { let json_value : serde_json :: Value = self . args ( ) . get :: < Value > ( " " ) . ok_or_else ( | | Error :: InputItemNotFound { name : " " . to_string ( ) , } ) . and_then ( serde_json :: Value :: try_from ) . map_err ( | _ | Error :: TypeConversionFailed { src : " " . to_string ( ) , dst : " " . to_string ( ) , } ) ? ; let parsed_input : T = serde_json :: from_value ( json_value ) . map_err ( | e | Error :: JsonDeserializationFailed { source : e } ) ? ; Ok ( parsed_input ) }
Returns the resolver input deserialized into a structure of type T that
implements the serde `Deserialize` trait.
Returns the resolver input deserialized into a structure of type T that implements the serde ` Deserialize ` trait .
&self
&self
errors
Returns an [`Error]` variant [`InputItemNotFound`] if no input field was passed
to the query, [`TypeConversionFailed`] if unable to convert a [`Value`]
to a serde_json Value, and [`JsonDeserializationFailed`] if unable to parse the
input data into a struct of type T.

[`Error`]: ../../error/enum.Error.html
[`InputItemNotFound`]: ../../error/enum.Error.html#variant.InputItemNotFound
[`TypeConversionFailed`]: ../../error/enum.Error.html#variant.TypeConversionFailed
[`JsonDeserializationFailed`]: ../../error/enum.Error.html#variant.JsonDeserializationFailed
[`Value`]: ../value/enum.Value.html
Returns an [ ` Error ] ` variant [ ` InputItemNotFound ` ] if no input field was passed to the query [ ` TypeConversionFailed ` ] if unable to convert a [ ` Value ` ] to a serde_json Value and [ ` JsonDeserializationFailed ` ] if unable to parse the input data into a struct of type T . [ ` Error ` ] : .. / .. / error / enum . Error . html [ ` InputItemNotFound ` ] : .. / .. / error / enum . Error . html#variant . InputItemNotFound [ ` TypeConversionFailed ` ] : .. / .. / error / enum . Error . html#variant . TypeConversionFailed [ ` JsonDeserializationFailed ` ] : .. / .. / error / enum . Error . html#variant . JsonDeserializationFailed [ ` Value ` ] : .. / value / enum . Value . html