pub struct DirectiveAnnotation { /* private fields */ }Expand description
Represents a
directive annotation
placed somewhere within a GraphQLType,
Mutation,
Query, or
Subscription.
A DirectiveAnnotation can be thought of as a “pointer” to some
Directive paired with a set of named arguments (Values).
Implementations§
Source§impl DirectiveAnnotation
impl DirectiveAnnotation
Sourcepub fn args(&self) -> &IndexMap<String, Value>
pub fn args(&self) -> &IndexMap<String, Value>
A map from ParameterName -> Value for all arguments passed to this
DirectiveAnnotation.
This returns an IndexMap to guarantee that map entries retain the same
ordering as the order of arguments passed to this directive annotation.
Sourcepub fn def_location(&self) -> &SourceLocation
pub fn def_location(&self) -> &SourceLocation
The SourceLocation indicating where this
annotation was specified within some
GraphQLType,
Mutation,
Query,
or Subscription.
Sourcepub fn directive_type<'schema>(
&self,
schema: &'schema Schema,
) -> &'schema Directive
pub fn directive_type<'schema>( &self, schema: &'schema Schema, ) -> &'schema Directive
The Directive type for which this annotation refers to.
Sourcepub fn directive_type_name(&self) -> &str
pub fn directive_type_name(&self) -> &str
Trait Implementations§
Source§impl Clone for DirectiveAnnotation
impl Clone for DirectiveAnnotation
Source§fn clone(&self) -> DirectiveAnnotation
fn clone(&self) -> DirectiveAnnotation
Returns a duplicate 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 moreSource§impl Debug for DirectiveAnnotation
impl Debug for DirectiveAnnotation
Source§impl<'de> Deserialize<'de> for DirectiveAnnotation
impl<'de> Deserialize<'de> for DirectiveAnnotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DirectiveAnnotation
impl PartialEq for DirectiveAnnotation
Source§impl Serialize for DirectiveAnnotation
impl Serialize for DirectiveAnnotation
impl StructuralPartialEq for DirectiveAnnotation
Auto Trait Implementations§
impl Freeze for DirectiveAnnotation
impl RefUnwindSafe for DirectiveAnnotation
impl Send for DirectiveAnnotation
impl Sync for DirectiveAnnotation
impl Unpin for DirectiveAnnotation
impl UnwindSafe for DirectiveAnnotation
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