Struct apollo_compiler::database::hir::InterfaceTypeDefinition
source · pub struct InterfaceTypeDefinition { /* private fields */ }
Implementations§
source§impl InterfaceTypeDefinition
impl InterfaceTypeDefinition
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get a reference to the interface definition’s description.
sourcepub fn self_implements_interfaces(&self) -> &[ImplementsInterface]
pub fn self_implements_interfaces(&self) -> &[ImplementsInterface]
Returns interfaces implemented by this interface type definition, excluding those from extensions.
sourcepub fn implements_interfaces(
&self
) -> impl Iterator<Item = &ImplementsInterface> + ExactSizeIterator + DoubleEndedIterator
pub fn implements_interfaces( &self ) -> impl Iterator<Item = &ImplementsInterface> + ExactSizeIterator + DoubleEndedIterator
Returns an iterator of interfaces implemented by this interface type, whether from its own definition or from extensions.
sourcepub fn implements_interface(&self, name: &str) -> bool
pub fn implements_interface(&self, name: &str) -> bool
Returns whether this interface type implements the interface of the given name, either in its own definition or its extensions.
sourcepub fn self_directives(&self) -> &[Directive]
pub fn self_directives(&self) -> &[Directive]
Get a reference to the interface definition’s directives (excluding those on extensions).
sourcepub fn directives(&self) -> impl Iterator<Item = &Directive> + '_
pub fn directives(&self) -> impl Iterator<Item = &Directive> + '_
Returns an iterator of directives on either the type definition or its type extensions
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).
Includes directives on either the schema
definition or its extensions,
like directives
.
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).
Includes directives on either the schema
definition or its extensions,
like directives
.
sourcepub fn self_fields(&self) -> &[FieldDefinition]
pub fn self_fields(&self) -> &[FieldDefinition]
Get a reference to interface definition’s fields, excluding those from extensions.
sourcepub fn fields(
&self
) -> impl Iterator<Item = &FieldDefinition> + ExactSizeIterator + DoubleEndedIterator
pub fn fields( &self ) -> impl Iterator<Item = &FieldDefinition> + ExactSizeIterator + DoubleEndedIterator
Returns an iterator of fields of this interface type, whether from its own definition or from extensions.
sourcepub fn field(&self, name: &str) -> Option<&FieldDefinition>
pub fn field(&self, name: &str) -> Option<&FieldDefinition>
Find a field by its name, either in this interface type definition or its extensions.
sourcepub fn loc(&self) -> HirNodeLocation
pub fn loc(&self) -> HirNodeLocation
Get the AST location information for this HIR node.
sourcepub fn extensions(&self) -> &[Arc<InterfaceTypeExtension>]
pub fn extensions(&self) -> &[Arc<InterfaceTypeExtension>]
Extensions that apply to this definition
Trait Implementations§
source§impl Clone for InterfaceTypeDefinition
impl Clone for InterfaceTypeDefinition
source§fn clone(&self) -> InterfaceTypeDefinition
fn clone(&self) -> InterfaceTypeDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InterfaceTypeDefinition
impl Debug for InterfaceTypeDefinition
source§impl Hash for InterfaceTypeDefinition
impl Hash for InterfaceTypeDefinition
source§impl PartialEq<InterfaceTypeDefinition> for InterfaceTypeDefinition
impl PartialEq<InterfaceTypeDefinition> for InterfaceTypeDefinition
source§fn eq(&self, other: &InterfaceTypeDefinition) -> bool
fn eq(&self, other: &InterfaceTypeDefinition) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for InterfaceTypeDefinition
impl StructuralEq for InterfaceTypeDefinition
impl StructuralPartialEq for InterfaceTypeDefinition
Auto Trait Implementations§
impl RefUnwindSafe for InterfaceTypeDefinition
impl Send for InterfaceTypeDefinition
impl Sync for InterfaceTypeDefinition
impl Unpin for InterfaceTypeDefinition
impl UnwindSafe for InterfaceTypeDefinition
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
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
key
and return true
if they are equal.