pub struct FieldSelection<'src> {
pub alias: Option<Name<'src>>,
pub arguments: Vec<Argument<'src>>,
pub directives: Vec<DirectiveAnnotation<'src>>,
pub name: Name<'src>,
pub selection_set: Option<SelectionSet<'src>>,
pub span: ByteSpan,
pub syntax: Option<Box<FieldSelectionSyntax<'src>>>,
}Expand description
A field selection within a selection set, optionally aliased, with arguments, directives, and a nested selection set.
See Fields in the spec.
Fields§
§alias: Option<Name<'src>>§arguments: Vec<Argument<'src>>§directives: Vec<DirectiveAnnotation<'src>>§name: Name<'src>§selection_set: Option<SelectionSet<'src>>§span: ByteSpan§syntax: Option<Box<FieldSelectionSyntax<'src>>>Implementations§
Source§impl<'src> FieldSelection<'src>
impl<'src> FieldSelection<'src>
Sourcepub fn name_value(&self) -> &str
pub fn name_value(&self) -> &str
Returns the name of this field selection as a string slice.
Convenience accessor for self.name.value.
Source§impl FieldSelection<'_>
impl FieldSelection<'_>
Sourcepub fn append_source(&self, sink: &mut String, source: Option<&str>)
pub fn append_source(&self, sink: &mut String, source: Option<&str>)
Sourcepub fn byte_span(&self) -> ByteSpan
pub fn byte_span(&self) -> ByteSpan
Returns this field selection’s byte-offset span within the source text.
The returned ByteSpan can be resolved to line/column
positions via source_span() or
ByteSpan::resolve().
Sourcepub fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
pub fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
Trait Implementations§
Source§impl AstNode for FieldSelection<'_>
impl AstNode for FieldSelection<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this field selection’s byte-offset span within the source text.
The returned ByteSpan can be resolved to line/column
positions via source_span() or
ByteSpan::resolve().
Source§fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
Source§impl<'src> Clone for FieldSelection<'src>
impl<'src> Clone for FieldSelection<'src>
Source§fn clone(&self) -> FieldSelection<'src>
fn clone(&self) -> FieldSelection<'src>
Returns a duplicate 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<'src> Debug for FieldSelection<'src>
impl<'src> Debug for FieldSelection<'src>
Source§impl<'src> PartialEq for FieldSelection<'src>
impl<'src> PartialEq for FieldSelection<'src>
impl<'src> StructuralPartialEq for FieldSelection<'src>
Auto Trait Implementations§
impl<'src> Freeze for FieldSelection<'src>
impl<'src> RefUnwindSafe for FieldSelection<'src>
impl<'src> Send for FieldSelection<'src>
impl<'src> Sync for FieldSelection<'src>
impl<'src> Unpin for FieldSelection<'src>
impl<'src> UnsafeUnpin for FieldSelection<'src>
impl<'src> UnwindSafe for FieldSelection<'src>
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