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