Struct apollo_compiler::database::hir::InputObjectTypeDefinition
source · pub struct InputObjectTypeDefinition { /* private fields */ }
Implementations§
source§impl InputObjectTypeDefinition
impl InputObjectTypeDefinition
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get a reference to the input object definition’s description.
sourcepub fn self_directives(&self) -> &[Directive]
pub fn self_directives(&self) -> &[Directive]
Get a reference to input object 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) -> &[InputValueDefinition]
pub fn self_fields(&self) -> &[InputValueDefinition]
Get a reference to input fields definitions, excluding those from extensions.
sourcepub fn fields(
&self
) -> impl Iterator<Item = &InputValueDefinition> + ExactSizeIterator + DoubleEndedIterator
pub fn fields( &self ) -> impl Iterator<Item = &InputValueDefinition> + ExactSizeIterator + DoubleEndedIterator
Returns an iterator of fields of this input object type, whether from its own definition or from extensions.
sourcepub fn field(&self, name: &str) -> Option<&InputValueDefinition>
pub fn field(&self, name: &str) -> Option<&InputValueDefinition>
Find a field by its name, either in this input object 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<InputObjectTypeExtension>]
pub fn extensions(&self) -> &[Arc<InputObjectTypeExtension>]
Extensions that apply to this definition
Trait Implementations§
source§impl Clone for InputObjectTypeDefinition
impl Clone for InputObjectTypeDefinition
source§fn clone(&self) -> InputObjectTypeDefinition
fn clone(&self) -> InputObjectTypeDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InputObjectTypeDefinition
impl Debug for InputObjectTypeDefinition
source§impl Hash for InputObjectTypeDefinition
impl Hash for InputObjectTypeDefinition
source§impl PartialEq<InputObjectTypeDefinition> for InputObjectTypeDefinition
impl PartialEq<InputObjectTypeDefinition> for InputObjectTypeDefinition
source§fn eq(&self, other: &InputObjectTypeDefinition) -> bool
fn eq(&self, other: &InputObjectTypeDefinition) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for InputObjectTypeDefinition
impl StructuralEq for InputObjectTypeDefinition
impl StructuralPartialEq for InputObjectTypeDefinition
Auto Trait Implementations§
impl RefUnwindSafe for InputObjectTypeDefinition
impl Send for InputObjectTypeDefinition
impl Sync for InputObjectTypeDefinition
impl Unpin for InputObjectTypeDefinition
impl UnwindSafe for InputObjectTypeDefinition
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.