pub struct ListTypeAnnotation<'src> {
pub element_type: Box<TypeAnnotation<'src>>,
pub nullability: Nullability<'src>,
pub span: ByteSpan,
pub syntax: Option<Box<ListTypeAnnotationSyntax<'src>>>,
}Expand description
A list type reference (e.g. [String], [String!]!).
See
Type References
in the spec. The span covers brackets and trailing !
when present.
Fields§
§element_type: Box<TypeAnnotation<'src>>§nullability: Nullability<'src>§span: ByteSpan§syntax: Option<Box<ListTypeAnnotationSyntax<'src>>>Implementations§
Source§impl<'src> ListTypeAnnotation<'src>
impl<'src> ListTypeAnnotation<'src>
Source§impl ListTypeAnnotation<'_>
impl ListTypeAnnotation<'_>
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 list type annotation’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 ListTypeAnnotation<'_>
impl AstNode for ListTypeAnnotation<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this list type annotation’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 ListTypeAnnotation<'src>
impl<'src> Clone for ListTypeAnnotation<'src>
Source§fn clone(&self) -> ListTypeAnnotation<'src>
fn clone(&self) -> ListTypeAnnotation<'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 ListTypeAnnotation<'src>
impl<'src> Debug for ListTypeAnnotation<'src>
Source§impl<'src> PartialEq for ListTypeAnnotation<'src>
impl<'src> PartialEq for ListTypeAnnotation<'src>
impl<'src> StructuralPartialEq for ListTypeAnnotation<'src>
Auto Trait Implementations§
impl<'src> Freeze for ListTypeAnnotation<'src>
impl<'src> RefUnwindSafe for ListTypeAnnotation<'src>
impl<'src> Send for ListTypeAnnotation<'src>
impl<'src> Sync for ListTypeAnnotation<'src>
impl<'src> Unpin for ListTypeAnnotation<'src>
impl<'src> UnsafeUnpin for ListTypeAnnotation<'src>
impl<'src> UnwindSafe for ListTypeAnnotation<'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