pub enum Path<'a> {
SchemaDefinition,
SchemaExtension(usize),
TypeDefinition(&'a str, Option<PathInType<'a>>),
TypeExtension(&'a str, usize, Option<PathInType<'a>>),
DirectiveDefinition(&'a str),
}Expand description
A structured path to a specific location in a schema.
Paths have a structured string representation.
Each level in a path is separated by a ‘.’ character. Directive uses, type definition extensions and schema definition extensions have an index to distinguish between them. The index is optional.
First level:
- Type definitions are unprefixed.
- Type extensions have an index, for example
Query[3]. - Directive definitions are prefixed with an
@:@authorized. :schemafor schema definitions,:schema[1](index) for extensions.
Second level:
- Fields, union members, enum values and input object fields are unprefixed.
- Directives on types and schema definitions are prefixed with an
@and followed by an index:@key[0]. - Interface implementations are prefixed with an
&:&SomeInterface.
Third level:
- Field arguments are unprefixed.
- Directives on fields and enum values are prefixed with an
@and followed by an index:@include[0].
Variants§
SchemaDefinition
SchemaExtension(usize)
TypeDefinition(&'a str, Option<PathInType<'a>>)
TypeExtension(&'a str, usize, Option<PathInType<'a>>)
DirectiveDefinition(&'a str)
Implementations§
Trait Implementations§
impl<'a> Eq for Path<'a>
Source§impl<'a> Ord for Path<'a>
impl<'a> Ord for Path<'a>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialOrd for Path<'a>
impl<'a> PartialOrd for Path<'a>
impl<'a> StructuralPartialEq for Path<'a>
Auto Trait Implementations§
impl<'a> Freeze for Path<'a>
impl<'a> RefUnwindSafe for Path<'a>
impl<'a> Send for Path<'a>
impl<'a> Sync for Path<'a>
impl<'a> Unpin for Path<'a>
impl<'a> UnsafeUnpin for Path<'a>
impl<'a> UnwindSafe for Path<'a>
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.