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>
Expand description
The name of the variable, without the preceding $
.
var_type: Positioned<Type>
Expand description
The type of the variable.
default_value: Option<Positioned<ConstValue>>
Expand description
The optional default value of the variable.
Implementations
impl VariableDefinition
[src]
impl VariableDefinition
[src]#[must_use]pub fn default_value(&self) -> Option<&ConstValue>
[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 Clone for VariableDefinition
[src]fn clone(&self) -> VariableDefinition
[src]
fn clone(&self) -> VariableDefinition
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for VariableDefinition
impl Send for VariableDefinition
impl Sync for VariableDefinition
impl Unpin for VariableDefinition
impl UnwindSafe for VariableDefinition
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more