Trait juniper::FromInputValue
[−]
[src]
pub trait FromInputValue: Sized { fn from(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 macros graphql_enum!
and
graphql_scalar!
. Must be implemented manually when manually exposing new
enums or scalars.
Required Methods
fn from(v: &InputValue) -> Option<Self>
Performs the conversion.
Implementors
impl FromInputValue for ID
impl FromInputValue for String
impl FromInputValue for bool
impl FromInputValue for i64
impl FromInputValue for f64
impl FromInputValue for ()
impl<T> FromInputValue for Box<T> where
T: FromInputValue,impl<T> FromInputValue for Option<T> where
T: FromInputValue,impl<T> FromInputValue for Vec<T> where
T: FromInputValue,impl FromInputValue for TypeKind