Trait juniper::FromInputValue
[−]
[src]
pub trait FromInputValue: Sized { fn from_input_value(v: &InputValue) -> Option<Self>; }
Parse an unstructured input value into a Rust data type.
The conversion can fail, and must in that case return None. Implemented
automatically by the convenience macro graphql_scalar! or by deriving GraphQLEnum.
Must be implemented manually when manually exposing new enums or scalars.
Required Methods
fn from_input_value(v: &InputValue) -> Option<Self>
Performs the conversion.
Implementations on Foreign Types
impl FromInputValue for String[src]
fn from_input_value(v: &InputValue) -> Option<String>[src]
impl FromInputValue for bool[src]
fn from_input_value(v: &InputValue) -> Option<bool>[src]
impl FromInputValue for i32[src]
fn from_input_value(v: &InputValue) -> Option<i32>[src]
impl FromInputValue for f64[src]
fn from_input_value(v: &InputValue) -> Option<f64>[src]
impl FromInputValue for ()[src]
fn from_input_value(_: &InputValue) -> Option<()>[src]
impl<T> FromInputValue for Box<T> where
T: FromInputValue, [src]
T: FromInputValue,
fn from_input_value(v: &InputValue) -> Option<Box<T>>[src]
impl<T> FromInputValue for Option<T> where
T: FromInputValue, [src]
T: FromInputValue,
fn from_input_value(v: &InputValue) -> Option<Option<T>>[src]
impl<T> FromInputValue for Vec<T> where
T: FromInputValue, [src]
T: FromInputValue,
fn from_input_value(v: &InputValue) -> Option<Vec<T>>[src]
impl FromInputValue for DateTime<FixedOffset>[src]
fn from_input_value(v: &InputValue) -> Option<DateTime<FixedOffset>>[src]
impl FromInputValue for DateTime<Utc>[src]
fn from_input_value(v: &InputValue) -> Option<DateTime<Utc>>[src]
impl FromInputValue for NaiveDate[src]
fn from_input_value(v: &InputValue) -> Option<NaiveDate>[src]
impl FromInputValue for NaiveDateTime[src]
fn from_input_value(v: &InputValue) -> Option<NaiveDateTime>[src]
impl FromInputValue for Url[src]
fn from_input_value(v: &InputValue) -> Option<Url>[src]
impl FromInputValue for Uuid[src]
fn from_input_value(v: &InputValue) -> Option<Uuid>[src]
Implementors
impl FromInputValue for ID