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.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConstDirective
impl RefUnwindSafe for ConstDirective
impl Send for ConstDirective
impl Sync for ConstDirective
impl Unpin for ConstDirective
impl UnwindSafe for ConstDirective
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)