Enum apollo_compiler::database::hir::Selection
source · pub enum Selection {
Field(Arc<Field>),
FragmentSpread(Arc<FragmentSpread>),
InlineFragment(Arc<InlineFragment>),
}
Variants§
Implementations§
source§impl Selection
impl Selection
sourcepub fn variables(&self, db: &dyn HirDatabase) -> Vec<Variable>
pub fn variables(&self, db: &dyn HirDatabase) -> Vec<Variable>
Get variables used in the selection set.
sourcepub fn is_fragment_spread(&self) -> bool
pub fn is_fragment_spread(&self) -> bool
Returns true
if the selection is FragmentSpread
.
sourcepub fn is_inline_fragment(&self) -> bool
pub fn is_inline_fragment(&self) -> bool
Returns true
if the selection is InlineFragment
.
sourcepub fn loc(&self) -> HirNodeLocation
pub fn loc(&self) -> HirNodeLocation
Get the AST location information for this HIR node.
Trait Implementations§
source§impl PartialEq<Selection> for Selection
impl PartialEq<Selection> for Selection
impl Eq for Selection
impl StructuralEq for Selection
impl StructuralPartialEq for Selection
Auto Trait Implementations§
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnwindSafe for Selection
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.