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 AstPositionExt for Selection
impl AstPositionExt for Selection
Source§fn default_position(self) -> Positioned<Self>
fn default_position(self) -> Positioned<Self>
Create a positioned version of this AST node with the default position (0:0).
Source§fn with_position(self, pos: Pos) -> Positioned<Self>
fn with_position(self, pos: Pos) -> Positioned<Self>
Create a positioned version of this AST node with the given position.
Source§impl<'de> Deserialize<'de> for Selection
impl<'de> Deserialize<'de> for Selection
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Selection
impl Serialize for Selection
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Selection
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