Struct apollo_compiler::database::hir::InputValueDefinition
source · pub struct InputValueDefinition { /* private fields */ }
Implementations§
source§impl InputValueDefinition
impl InputValueDefinition
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get a reference to input value definition’s description.
sourcepub fn directives(&self) -> &[Directive]
pub fn directives(&self) -> &[Directive]
Return the directives used on this input value definition.
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 loc(&self) -> Option<HirNodeLocation>
pub fn loc(&self) -> Option<HirNodeLocation>
Get the AST location information for this HIR node.
sourcepub fn default_value(&self) -> Option<&DefaultValue>
pub fn default_value(&self) -> Option<&DefaultValue>
Get a refernce to inpul value definition’s default_value.
sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
If the argument does not have a default value and has a non-null type, a value must be provided by users.
Trait Implementations§
source§impl Clone for InputValueDefinition
impl Clone for InputValueDefinition
source§fn clone(&self) -> InputValueDefinition
fn clone(&self) -> InputValueDefinition
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 InputValueDefinition
impl Debug for InputValueDefinition
source§impl Hash for InputValueDefinition
impl Hash for InputValueDefinition
source§impl PartialEq<InputValueDefinition> for InputValueDefinition
impl PartialEq<InputValueDefinition> for InputValueDefinition
source§fn eq(&self, other: &InputValueDefinition) -> bool
fn eq(&self, other: &InputValueDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InputValueDefinition
impl StructuralEq for InputValueDefinition
impl StructuralPartialEq for InputValueDefinition
Auto Trait Implementations§
impl RefUnwindSafe for InputValueDefinition
impl Send for InputValueDefinition
impl Sync for InputValueDefinition
impl Unpin for InputValueDefinition
impl UnwindSafe for InputValueDefinition
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.