Trait cynic::variables::QueryVariables
source · pub trait QueryVariables {
type Fields: QueryVariablesFields;
const VARIABLES: &'static [(&'static str, VariableType)];
}
Expand description
Allows a struct to be used as variables in a GraphQL query.
Users should not implement this themselves, and should use the
QueryVariables
derive. All the fields on a QueryVariables
struct should
be available as variables in the query, using $variable_name
notation.
Required Associated Types§
sourcetype Fields: QueryVariablesFields
type Fields: QueryVariablesFields
A struct that determines which variables are available when using this struct.
Required Associated Constants§
sourceconst VARIABLES: &'static [(&'static str, VariableType)]
const VARIABLES: &'static [(&'static str, VariableType)]
An associated constant that contains the variable names & their types.
This is used to construct the query string we send to a server.
Object Safety§
This trait is not object safe.