Enum apollo_compiler::database::hir::TypeExtension
source · pub enum TypeExtension {
ScalarTypeExtension(Arc<ScalarTypeExtension>),
ObjectTypeExtension(Arc<ObjectTypeExtension>),
InterfaceTypeExtension(Arc<InterfaceTypeExtension>),
UnionTypeExtension(Arc<UnionTypeExtension>),
EnumTypeExtension(Arc<EnumTypeExtension>),
InputObjectTypeExtension(Arc<InputObjectTypeExtension>),
}
Variants§
ScalarTypeExtension(Arc<ScalarTypeExtension>)
ObjectTypeExtension(Arc<ObjectTypeExtension>)
InterfaceTypeExtension(Arc<InterfaceTypeExtension>)
UnionTypeExtension(Arc<UnionTypeExtension>)
EnumTypeExtension(Arc<EnumTypeExtension>)
InputObjectTypeExtension(Arc<InputObjectTypeExtension>)
Implementations§
source§impl TypeExtension
impl TypeExtension
pub fn name(&self) -> &str
pub fn name_src(&self) -> &Name
pub fn kind(&self) -> &'static str
pub fn directives(&self) -> &[Directive]
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).
pub fn field(&self, name: &str) -> Option<&FieldDefinition>
pub fn loc(&self) -> HirNodeLocation
Trait Implementations§
source§impl Clone for TypeExtension
impl Clone for TypeExtension
source§fn clone(&self) -> TypeExtension
fn clone(&self) -> TypeExtension
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 TypeExtension
impl Debug for TypeExtension
source§impl Hash for TypeExtension
impl Hash for TypeExtension
source§impl PartialEq<TypeExtension> for TypeExtension
impl PartialEq<TypeExtension> for TypeExtension
source§fn eq(&self, other: &TypeExtension) -> bool
fn eq(&self, other: &TypeExtension) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TypeExtension
impl StructuralEq for TypeExtension
impl StructuralPartialEq for TypeExtension
Auto Trait Implementations§
impl RefUnwindSafe for TypeExtension
impl Send for TypeExtension
impl Sync for TypeExtension
impl Unpin for TypeExtension
impl UnwindSafe for TypeExtension
Blanket Implementations§
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.