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
sourceimpl 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more