pub struct IntValue<'src> {
pub span: ByteSpan,
pub syntax: Option<Box<IntValueSyntax<'src>>>,
pub value: i32,
}Expand description
A GraphQL integer value.
Per the Int
section of the spec, implementations should support
“at minimum, the range of a signed 32-bit integer.”
This parser represents Int values as i32. On
overflow/underflow the parser emits a diagnostic and
clamps to i32::MAX / i32::MIN.
Fields§
§span: ByteSpan§syntax: Option<Box<IntValueSyntax<'src>>>§value: i32The parsed 32-bit integer value. On overflow/underflow
the parser emits a diagnostic and clamps to
i32::MAX / i32::MIN.
Implementations§
Source§impl IntValue<'_>
impl IntValue<'_>
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 int value’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 IntValue<'_>
impl AstNode for IntValue<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this int value’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 IntValue<'src>
Auto Trait Implementations§
impl<'src> Freeze for IntValue<'src>
impl<'src> RefUnwindSafe for IntValue<'src>
impl<'src> Send for IntValue<'src>
impl<'src> Sync for IntValue<'src>
impl<'src> Unpin for IntValue<'src>
impl<'src> UnsafeUnpin for IntValue<'src>
impl<'src> UnwindSafe for IntValue<'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