[][src]Trait cynic::IntoArgument

pub trait IntoArgument<Argument> where
    Argument: SerializableArgument + Send + 'static, 
{ fn into_argument(self) -> Argument; }

IntoArgument is used to type-check arguments to queries in cynic.

A GraphQL argument that accepts String! will accept any type that is IntoArgument<String>. Similarly, an optional String in GraphQL will accept any IntoArgument<Option<String>>.

There are implementations of this for most of the built in scalars to allow users to express arguments in a simple manner. The cynic::Enum derive also generates impls for converting options & refs easily.

Required methods

fn into_argument(self) -> Argument

Loading content...

Implementations on Foreign Types

impl IntoArgument<Option<i32>> for i32[src]

impl<'_> IntoArgument<Option<i32>> for &'_ i32[src]

impl IntoArgument<Option<f64>> for f64[src]

impl<'_> IntoArgument<Option<f64>> for &'_ f64[src]

impl IntoArgument<Option<String>> for String[src]

impl<'_> IntoArgument<Option<String>> for &'_ String[src]

impl IntoArgument<Option<bool>> for bool[src]

impl<'_> IntoArgument<Option<bool>> for &'_ bool[src]

impl<'_> IntoArgument<Option<i32>> for Option<&'_ i32>[src]

impl<'_> IntoArgument<Option<i32>> for &'_ Option<i32>[src]

impl<'_> IntoArgument<Option<f64>> for Option<&'_ f64>[src]

impl<'_> IntoArgument<Option<f64>> for &'_ Option<f64>[src]

impl<'_> IntoArgument<Option<String>> for Option<&'_ String>[src]

impl<'_> IntoArgument<Option<String>> for &'_ Option<String>[src]

impl<'_> IntoArgument<Option<bool>> for Option<&'_ bool>[src]

impl<'_> IntoArgument<Option<bool>> for &'_ Option<bool>[src]

impl<'_> IntoArgument<Option<Id>> for Option<&'_ Id>[src]

impl<'_> IntoArgument<Option<Id>> for &'_ Option<Id>[src]

impl<'_> IntoArgument<String> for &'_ str[src]

impl<'_> IntoArgument<Option<String>> for &'_ str[src]

impl<'_> IntoArgument<Option<String>> for Option<&'_ str>[src]

Loading content...

Implementors

impl IntoArgument<Option<Id>> for Id[src]

impl<'_> IntoArgument<Option<Id>> for &'_ Id[src]

impl<T> IntoArgument<T> for T where
    T: SerializableArgument + Send + 'static, 
[src]

Loading content...