pub enum DirectiveLocationKind {
Show 19 variants
Query,
Mutation,
Subscription,
Field,
FragmentDefinition,
FragmentSpread,
InlineFragment,
VariableDefinition,
Schema,
Scalar,
Object,
FieldDefinition,
ArgumentDefinition,
Interface,
Union,
Enum,
EnumValue,
InputObject,
InputFieldDefinition,
}Expand description
Directive location kinds for custom directive definitions.
This mirrors DirectiveLocation in introspection but is used for
compiled schema definitions. The two types can be converted between
each other for introspection purposes.
Per GraphQL spec §3.13, directive locations fall into two categories:
- Executable locations (operations, fields, fragments)
- Type system locations (schema definitions)
Variants§
Query
Directive on query operation.
Mutation
Directive on mutation operation.
Subscription
Directive on subscription operation.
Field
Directive on field selection.
FragmentDefinition
Directive on fragment definition.
FragmentSpread
Directive on fragment spread.
InlineFragment
Directive on inline fragment.
VariableDefinition
Directive on variable definition.
Schema
Directive on schema definition.
Scalar
Directive on scalar type definition.
Object
Directive on object type definition.
FieldDefinition
Directive on field definition.
ArgumentDefinition
Directive on argument definition.
Interface
Directive on interface definition.
Union
Directive on union definition.
Enum
Directive on enum definition.
EnumValue
Directive on enum value definition.
InputObject
Directive on input object definition.
InputFieldDefinition
Directive on input field definition.
Implementations§
Source§impl DirectiveLocationKind
impl DirectiveLocationKind
Sourcepub fn is_executable(&self) -> bool
pub fn is_executable(&self) -> bool
Check if this is an executable directive location.
Sourcepub fn is_type_system(&self) -> bool
pub fn is_type_system(&self) -> bool
Check if this is a type system directive location.
Trait Implementations§
Source§impl Clone for DirectiveLocationKind
impl Clone for DirectiveLocationKind
Source§fn clone(&self) -> DirectiveLocationKind
fn clone(&self) -> DirectiveLocationKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectiveLocationKind
impl Debug for DirectiveLocationKind
Source§impl<'de> Deserialize<'de> for DirectiveLocationKind
impl<'de> Deserialize<'de> for DirectiveLocationKind
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>,
Source§impl From<DirectiveLocationKind> for DirectiveLocation
impl From<DirectiveLocationKind> for DirectiveLocation
Source§fn from(kind: DirectiveLocationKind) -> Self
fn from(kind: DirectiveLocationKind) -> Self
Source§impl Hash for DirectiveLocationKind
impl Hash for DirectiveLocationKind
Source§impl PartialEq for DirectiveLocationKind
impl PartialEq for DirectiveLocationKind
Source§impl Serialize for DirectiveLocationKind
impl Serialize for DirectiveLocationKind
impl Copy for DirectiveLocationKind
impl Eq for DirectiveLocationKind
impl StructuralPartialEq for DirectiveLocationKind
Auto Trait Implementations§
impl Freeze for DirectiveLocationKind
impl RefUnwindSafe for DirectiveLocationKind
impl Send for DirectiveLocationKind
impl Sync for DirectiveLocationKind
impl Unpin for DirectiveLocationKind
impl UnsafeUnpin for DirectiveLocationKind
impl UnwindSafe for DirectiveLocationKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.