Struct apollo_compiler::database::hir::SchemaExtension
source · pub struct SchemaExtension { /* private fields */ }
Implementations§
source§impl SchemaExtension
impl SchemaExtension
sourcepub fn directives(&self) -> &[Directive]
pub fn directives(&self) -> &[Directive]
Get a reference to the schema definition’s directives.
sourcepub fn directive_by_name(&self, name: &str) -> Option<&Directive>
pub fn directive_by_name(&self, name: &str) -> Option<&Directive>
Returns the first directive with the given name.
For repeatable directives, see directives_by_name
(plural).
sourcepub fn directives_by_name<'def: 'name, 'name>(
&'def self,
name: &'name str
) -> impl Iterator<Item = &'def Directive> + 'name
pub fn directives_by_name<'def: 'name, 'name>( &'def self, name: &'name str ) -> impl Iterator<Item = &'def Directive> + 'name
Returns an iterator of directives with the given name.
For non-repeatable directives, directive_by_name
(singular).
sourcepub fn root_operations(&self) -> &[RootOperationTypeDefinition]
pub fn root_operations(&self) -> &[RootOperationTypeDefinition]
Get a reference to the schema definition’s root operation type definition.
sourcepub fn loc(&self) -> HirNodeLocation
pub fn loc(&self) -> HirNodeLocation
Get the AST location information for this HIR node.
Trait Implementations§
source§impl Clone for SchemaExtension
impl Clone for SchemaExtension
source§fn clone(&self) -> SchemaExtension
fn clone(&self) -> SchemaExtension
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 SchemaExtension
impl Debug for SchemaExtension
source§impl Hash for SchemaExtension
impl Hash for SchemaExtension
source§impl PartialEq<SchemaExtension> for SchemaExtension
impl PartialEq<SchemaExtension> for SchemaExtension
source§fn eq(&self, other: &SchemaExtension) -> bool
fn eq(&self, other: &SchemaExtension) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SchemaExtension
impl StructuralEq for SchemaExtension
impl StructuralPartialEq for SchemaExtension
Auto Trait Implementations§
impl RefUnwindSafe for SchemaExtension
impl Send for SchemaExtension
impl Sync for SchemaExtension
impl Unpin for SchemaExtension
impl UnwindSafe for SchemaExtension
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.