Struct apollo_compiler::executable::SelectionSet
source · pub struct SelectionSet {
pub ty: NamedType,
pub selections: Vec<Selection>,
}
Fields§
§ty: NamedType
§selections: Vec<Selection>
Implementations§
source§impl SelectionSet
impl SelectionSet
pub fn push(&mut self, selection: impl Into<Selection>)
pub fn extend( &mut self, selections: impl IntoIterator<Item = impl Into<Selection>> )
sourcepub fn new_field<'schema>(
&self,
schema: &'schema Schema,
name: Name
) -> Result<Field, FieldLookupError<'schema>>
pub fn new_field<'schema>( &self, schema: &'schema Schema, name: Name ) -> Result<Field, FieldLookupError<'schema>>
Create a new field to be added to this selection set with push
Returns an error if the type of this selection set is not defined
or does not have a field named name
.
sourcepub fn new_inline_fragment(
&self,
opt_type_condition: Option<NamedType>
) -> InlineFragment
pub fn new_inline_fragment( &self, opt_type_condition: Option<NamedType> ) -> InlineFragment
Create a new inline fragment to be added to this selection set with push
sourcepub fn new_fragment_spread(&self, fragment_name: Name) -> FragmentSpread
pub fn new_fragment_spread(&self, fragment_name: Name) -> FragmentSpread
Create a new fragment spread to be added to this selection set with push
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 Display for SelectionSet
impl Display for SelectionSet
Serialize to GraphQL syntax with the default configuration
source§impl Hash for SelectionSet
impl Hash for SelectionSet
source§impl PartialEq for SelectionSet
impl PartialEq 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 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.