pub struct Argument<'src> {
pub name: Name<'src>,
pub span: ByteSpan,
pub syntax: Option<Box<ArgumentSyntax<'src>>>,
pub value: Value<'src>,
}Expand description
A single argument in a field selection or directive annotation.
See Arguments in the spec.
Fields§
§name: Name<'src>§span: ByteSpan§syntax: Option<Box<ArgumentSyntax<'src>>>§value: Value<'src>Implementations§
Source§impl<'src> Argument<'src>
impl<'src> Argument<'src>
Sourcepub fn name_value(&self) -> &str
pub fn name_value(&self) -> &str
Returns the name of this argument as a string slice.
Convenience accessor for self.name.value.
Source§impl Argument<'_>
impl Argument<'_>
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 argument’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 Argument<'_>
impl AstNode for Argument<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this argument’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>
impl<'src> StructuralPartialEq for Argument<'src>
Auto Trait Implementations§
impl<'src> Freeze for Argument<'src>
impl<'src> RefUnwindSafe for Argument<'src>
impl<'src> Send for Argument<'src>
impl<'src> Sync for Argument<'src>
impl<'src> Unpin for Argument<'src>
impl<'src> UnsafeUnpin for Argument<'src>
impl<'src> UnwindSafe for Argument<'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