Struct async_graphql_parser::types::ConstDirective
source · pub struct ConstDirective {
pub name: Positioned<Name>,
pub arguments: Vec<(Positioned<Name>, Positioned<ConstValue>)>,
}
Expand description
A const GraphQL directive, such as @deprecated(reason: "Use the other field)
. This differs from Directive
in that it
uses ConstValue
instead of
Value
.
Fields§
§name: Positioned<Name>
The name of the directive.
arguments: Vec<(Positioned<Name>, Positioned<ConstValue>)>
The arguments to the directive.
Implementations§
source§impl ConstDirective
impl ConstDirective
sourcepub fn into_directive(self) -> Directive
pub fn into_directive(self) -> Directive
Convert this ConstDirective
into a Directive
.
sourcepub fn get_argument(&self, name: &str) -> Option<&Positioned<ConstValue>>
pub fn get_argument(&self, name: &str) -> Option<&Positioned<ConstValue>>
Get the argument with the given name.
Trait Implementations§
source§impl Clone for ConstDirective
impl Clone for ConstDirective
source§fn clone(&self) -> ConstDirective
fn clone(&self) -> ConstDirective
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more