pub struct InputValueDefinition<'src> {
pub default_value: Option<Value<'src>>,
pub description: Option<StringValue<'src>>,
pub directives: Vec<DirectiveAnnotation<'src>>,
pub name: Name<'src>,
pub span: ByteSpan,
pub syntax: Option<Box<InputValueDefinitionSyntax<'src>>>,
pub value_type: TypeAnnotation<'src>,
}Expand description
An input value definition, used for field arguments and input object fields.
See Input Values Definitions in the spec.
Fields§
§default_value: Option<Value<'src>>§description: Option<StringValue<'src>>§directives: Vec<DirectiveAnnotation<'src>>§name: Name<'src>§span: ByteSpan§syntax: Option<Box<InputValueDefinitionSyntax<'src>>>§value_type: TypeAnnotation<'src>Implementations§
Source§impl<'src> InputValueDefinition<'src>
impl<'src> InputValueDefinition<'src>
Sourcepub fn name_value(&self) -> &str
pub fn name_value(&self) -> &str
Returns the name of this input value definition as a string slice.
Convenience accessor for self.name.value.
Source§impl InputValueDefinition<'_>
impl InputValueDefinition<'_>
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 input value definition’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 InputValueDefinition<'_>
impl AstNode for InputValueDefinition<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this input value definition’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 InputValueDefinition<'src>
impl<'src> Clone for InputValueDefinition<'src>
Source§fn clone(&self) -> InputValueDefinition<'src>
fn clone(&self) -> InputValueDefinition<'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 InputValueDefinition<'src>
impl<'src> Debug for InputValueDefinition<'src>
Source§impl<'src> PartialEq for InputValueDefinition<'src>
impl<'src> PartialEq for InputValueDefinition<'src>
impl<'src> StructuralPartialEq for InputValueDefinition<'src>
Auto Trait Implementations§
impl<'src> Freeze for InputValueDefinition<'src>
impl<'src> RefUnwindSafe for InputValueDefinition<'src>
impl<'src> Send for InputValueDefinition<'src>
impl<'src> Sync for InputValueDefinition<'src>
impl<'src> Unpin for InputValueDefinition<'src>
impl<'src> UnsafeUnpin for InputValueDefinition<'src>
impl<'src> UnwindSafe for InputValueDefinition<'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