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
sourceimpl 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
sourceimpl Clone for ConstDirective
impl Clone for ConstDirective
sourcefn clone(&self) -> ConstDirective
fn clone(&self) -> ConstDirective
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for ConstDirective
impl Send for ConstDirective
impl Sync for ConstDirective
impl Unpin for ConstDirective
impl UnwindSafe for ConstDirective
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more