Enum async_graphql_parser::types::Selection
source · pub enum Selection {
Field(Positioned<Field>),
FragmentSpread(Positioned<FragmentSpread>),
InlineFragment(Positioned<InlineFragment>),
}
Expand description
A part of an object to be selected; a single field, a fragment spread or an inline fragment.
Variants§
Field(Positioned<Field>)
Select a single field, such as name
or weightKilos: weight(unit: KILOGRAMS)
.
FragmentSpread(Positioned<FragmentSpread>)
Select using a fragment.
InlineFragment(Positioned<InlineFragment>)
Select using an inline fragment.
Implementations§
source§impl Selection
impl Selection
sourcepub fn directives(&self) -> &Vec<Positioned<Directive>>
pub fn directives(&self) -> &Vec<Positioned<Directive>>
Get a reference to the directives of the selection.
sourcepub fn directives_mut(&mut self) -> &mut Vec<Positioned<Directive>>
pub fn directives_mut(&mut self) -> &mut Vec<Positioned<Directive>>
Get a mutable reference to the directives of the selection.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Selection
impl<'de> Deserialize<'de> for Selection
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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