[][src]Struct async_graphql_parser::types::VariableDefinition

pub struct VariableDefinition {
    pub name: Positioned<Name>,
    pub var_type: Positioned<Type>,
    pub default_value: Option<Positioned<ConstValue>>,
}

A variable definition inside a list of variable definitions, for example $name:String!.

Reference.

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

impl VariableDefinition[src]

#[must_use]pub fn default_value(&self) -> Option<&ConstValue>[src]

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

impl Clone for VariableDefinition[src]

impl Debug for VariableDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.