Enum graphql_parser::schema::DirectiveLocation [−][src]
pub enum DirectiveLocation {
Query,
Mutation,
Subscription,
Field,
FragmentDefinition,
FragmentSpread,
InlineFragment,
Schema,
Scalar,
Object,
FieldDefinition,
ArgumentDefinition,
Interface,
Union,
Enum,
EnumValue,
InputObject,
InputFieldDefinition,
}Variants
QueryMutationSubscriptionFieldFragmentDefinitionFragmentSpreadInlineFragmentSchemaScalarObjectFieldDefinitionArgumentDefinitionInterfaceUnionEnumEnumValueInputObjectInputFieldDefinition
Methods
impl DirectiveLocation[src]
impl DirectiveLocationpub fn as_str(&self) -> &'static str[src]
pub fn as_str(&self) -> &'static strReturns GraphQL syntax compatible name of the directive
pub fn is_query(&self) -> bool[src]
pub fn is_query(&self) -> boolReturns true if this location is for queries (execution)
pub fn is_schema(&self) -> bool[src]
pub fn is_schema(&self) -> boolReturns true if this location is for schema
Trait Implementations
impl Debug for DirectiveLocation[src]
impl Debug for DirectiveLocationfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for DirectiveLocation[src]
impl Clone for DirectiveLocationfn clone(&self) -> DirectiveLocation[src]
fn clone(&self) -> DirectiveLocationReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for DirectiveLocation[src]
impl PartialEq for DirectiveLocationfn eq(&self, other: &DirectiveLocation) -> bool[src]
fn eq(&self, other: &DirectiveLocation) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl Eq for DirectiveLocation[src]
impl Eq for DirectiveLocationimpl Hash for DirectiveLocation[src]
impl Hash for DirectiveLocationfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl FromStr for DirectiveLocation[src]
impl FromStr for DirectiveLocationtype Err = InvalidDirectiveLocation
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<DirectiveLocation, InvalidDirectiveLocation>[src]
fn from_str(s: &str) -> Result<DirectiveLocation, InvalidDirectiveLocation>Parses a string s to return a value of this type. Read more
Auto Trait Implementations
impl Send for DirectiveLocation
impl Send for DirectiveLocationimpl Sync for DirectiveLocation
impl Sync for DirectiveLocation