Struct async_graphql_parser::types::VariableDefinition [−][src]
pub struct VariableDefinition {
pub name: Positioned<Name>,
pub var_type: Positioned<Type>,
pub default_value: Option<Positioned<ConstValue>>,
}Expand description
A variable definition inside a list of variable definitions, for example $name:String!.
Fields
name: Positioned<Name>The name of the variable, without the preceding $.
var_type: Positioned<Type>The type of the variable.
default_value: Option<Positioned<ConstValue>>The optional default value of the variable.
Implementations
Get the default value of the variable; this is default_value if it is present,
Value::Null if it is nullable and None otherwise.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VariableDefinitionimpl Send for VariableDefinitionimpl Sync for VariableDefinitionimpl Unpin for VariableDefinitionimpl UnwindSafe for VariableDefinitionBlanket Implementations
Mutably borrows from an owned value. Read more