pub enum SchemaCoordinate {
Type(TypeCoordinate),
TypeAttribute(TypeAttributeCoordinate),
FieldArgument(FieldArgumentCoordinate),
Directive(DirectiveCoordinate),
DirectiveArgument(DirectiveArgumentCoordinate),
}Expand description
Any schema coordinate.
Example
use apollo_compiler::name;
use apollo_compiler::coordinate::{SchemaCoordinate, FieldArgumentCoordinate};
let coord: SchemaCoordinate = "Type.field(argument:)".parse().unwrap();
assert_eq!(coord, SchemaCoordinate::FieldArgument(
FieldArgumentCoordinate {
ty: name!("Type"),
field: name!("field"),
argument: name!("argument"),
},
));Variants§
Type(TypeCoordinate)
TypeAttribute(TypeAttributeCoordinate)
FieldArgument(FieldArgumentCoordinate)
Directive(DirectiveCoordinate)
DirectiveArgument(DirectiveArgumentCoordinate)
Implementations§
source§impl SchemaCoordinate
impl SchemaCoordinate
sourcepub fn lookup<'coord, 'schema>(
&'coord self,
schema: &'schema Schema
) -> Result<SchemaCoordinateLookup<'schema>, SchemaLookupError<'coord, 'schema>>
pub fn lookup<'coord, 'schema>( &'coord self, schema: &'schema Schema ) -> Result<SchemaCoordinateLookup<'schema>, SchemaLookupError<'coord, 'schema>>
Look up this coordinate in a schema.
Trait Implementations§
source§impl Clone for SchemaCoordinate
impl Clone for SchemaCoordinate
source§fn clone(&self) -> SchemaCoordinate
fn clone(&self) -> SchemaCoordinate
Returns a copy 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 SchemaCoordinate
impl Debug for SchemaCoordinate
source§impl Display for SchemaCoordinate
impl Display for SchemaCoordinate
source§impl From<DirectiveArgumentCoordinate> for SchemaCoordinate
impl From<DirectiveArgumentCoordinate> for SchemaCoordinate
source§fn from(inner: DirectiveArgumentCoordinate) -> Self
fn from(inner: DirectiveArgumentCoordinate) -> Self
Converts to this type from the input type.
source§impl From<DirectiveCoordinate> for SchemaCoordinate
impl From<DirectiveCoordinate> for SchemaCoordinate
source§fn from(inner: DirectiveCoordinate) -> Self
fn from(inner: DirectiveCoordinate) -> Self
Converts to this type from the input type.
source§impl From<FieldArgumentCoordinate> for SchemaCoordinate
impl From<FieldArgumentCoordinate> for SchemaCoordinate
source§fn from(inner: FieldArgumentCoordinate) -> Self
fn from(inner: FieldArgumentCoordinate) -> Self
Converts to this type from the input type.
source§impl From<TypeAttributeCoordinate> for SchemaCoordinate
impl From<TypeAttributeCoordinate> for SchemaCoordinate
source§fn from(inner: TypeAttributeCoordinate) -> Self
fn from(inner: TypeAttributeCoordinate) -> Self
Converts to this type from the input type.
source§impl From<TypeCoordinate> for SchemaCoordinate
impl From<TypeCoordinate> for SchemaCoordinate
source§fn from(inner: TypeCoordinate) -> Self
fn from(inner: TypeCoordinate) -> Self
Converts to this type from the input type.
source§impl FromStr for SchemaCoordinate
impl FromStr for SchemaCoordinate
source§impl Hash for SchemaCoordinate
impl Hash for SchemaCoordinate
source§impl PartialEq for SchemaCoordinate
impl PartialEq for SchemaCoordinate
source§fn eq(&self, other: &SchemaCoordinate) -> bool
fn eq(&self, other: &SchemaCoordinate) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for SchemaCoordinate
impl StructuralEq for SchemaCoordinate
impl StructuralPartialEq for SchemaCoordinate
Auto Trait Implementations§
impl RefUnwindSafe for SchemaCoordinate
impl Send for SchemaCoordinate
impl Sync for SchemaCoordinate
impl Unpin for SchemaCoordinate
impl UnwindSafe for SchemaCoordinate
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.