Struct apollo_compiler::database::hir::SelectionSet
source · pub struct SelectionSet { /* private fields */ }
Implementations§
source§impl SelectionSet
impl SelectionSet
sourcepub fn fields(&self) -> Vec<Field>
pub fn fields(&self) -> Vec<Field>
Get a refernce to the selection set’s fields (not inline fragments, or fragment spreads).
sourcepub fn fragment_spreads(&self) -> Vec<FragmentSpread>
pub fn fragment_spreads(&self) -> Vec<FragmentSpread>
Get a reference to selection set’s fragment spread.
sourcepub fn inline_fragments(&self) -> Vec<InlineFragment>
pub fn inline_fragments(&self) -> Vec<InlineFragment>
Get a reference to selection set’s inline fragments.
sourcepub fn variables(&self, db: &dyn HirDatabase) -> Vec<Variable>
pub fn variables(&self, db: &dyn HirDatabase) -> Vec<Variable>
Get all variables used in this selection set.
sourcepub fn is_introspection(&self, db: &dyn HirDatabase) -> bool
pub fn is_introspection(&self, db: &dyn HirDatabase) -> bool
Returns true if all the Selection
s in this selection set are themselves introspections.
sourcepub fn concat(&self, other: &SelectionSet) -> SelectionSet
pub fn concat(&self, other: &SelectionSet) -> SelectionSet
Create a selection set for the concatenation of two selection sets’ fields.
This does not deduplicate fields: if the two selection sets both select a field a
, the
merged set will select field a
twice.
Trait Implementations§
source§impl Clone for SelectionSet
impl Clone for SelectionSet
source§fn clone(&self) -> SelectionSet
fn clone(&self) -> SelectionSet
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 SelectionSet
impl Debug for SelectionSet
source§impl Hash for SelectionSet
impl Hash for SelectionSet
source§impl PartialEq<SelectionSet> for SelectionSet
impl PartialEq<SelectionSet> for SelectionSet
source§fn eq(&self, other: &SelectionSet) -> bool
fn eq(&self, other: &SelectionSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SelectionSet
impl StructuralEq for SelectionSet
impl StructuralPartialEq for SelectionSet
Auto Trait Implementations§
impl RefUnwindSafe for SelectionSet
impl Send for SelectionSet
impl Sync for SelectionSet
impl Unpin for SelectionSet
impl UnwindSafe for SelectionSet
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.