pub struct IntermediateDirective {
pub name: String,
pub locations: Vec<String>,
pub arguments: Vec<IntermediateArgument>,
pub repeatable: bool,
pub description: Option<String>,
}Expand description
Directive definition in intermediate format.
Directives provide a way to describe alternate runtime execution and type validation. Per GraphQL spec §2.12, directives can be applied to various locations.
§Example JSON
{
"name": "auth",
"locations": ["FIELD_DEFINITION", "OBJECT"],
"arguments": [{"name": "role", "type": "String", "nullable": false}],
"description": "Requires authentication with specified role"
}Fields§
§name: StringDirective name (without @, e.g., “auth”, “deprecated”)
locations: Vec<String>Valid locations where this directive can be applied
arguments: Vec<IntermediateArgument>Directive arguments
repeatable: boolWhether the directive can be applied multiple times
description: Option<String>Directive description
Trait Implementations§
Source§impl Clone for IntermediateDirective
impl Clone for IntermediateDirective
Source§fn clone(&self) -> IntermediateDirective
fn clone(&self) -> IntermediateDirective
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 IntermediateDirective
impl Debug for IntermediateDirective
Source§impl<'de> Deserialize<'de> for IntermediateDirective
impl<'de> Deserialize<'de> for IntermediateDirective
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 IntermediateDirective
impl PartialEq for IntermediateDirective
Source§impl Serialize for IntermediateDirective
impl Serialize for IntermediateDirective
impl Eq for IntermediateDirective
impl StructuralPartialEq for IntermediateDirective
Auto Trait Implementations§
impl Freeze for IntermediateDirective
impl RefUnwindSafe for IntermediateDirective
impl Send for IntermediateDirective
impl Sync for IntermediateDirective
impl Unpin for IntermediateDirective
impl UnwindSafe for IntermediateDirective
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§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
Compare self to
key and return true if they are equal.