pub struct TypeCondition<'src> {
pub named_type: Name<'src>,
pub span: ByteSpan,
pub syntax: Option<Box<TypeConditionSyntax<'src>>>,
}Expand description
A type condition (e.g., on User) used in fragment
definitions and inline fragments.
See Type Conditions in the spec.
Fields§
§named_type: Name<'src>§span: ByteSpan§syntax: Option<Box<TypeConditionSyntax<'src>>>Implementations§
Source§impl TypeCondition<'_>
impl TypeCondition<'_>
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 type condition’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 TypeCondition<'_>
impl AstNode for TypeCondition<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this type condition’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 TypeCondition<'src>
impl<'src> Clone for TypeCondition<'src>
Source§fn clone(&self) -> TypeCondition<'src>
fn clone(&self) -> TypeCondition<'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 TypeCondition<'src>
impl<'src> Debug for TypeCondition<'src>
Source§impl<'src> PartialEq for TypeCondition<'src>
impl<'src> PartialEq for TypeCondition<'src>
impl<'src> StructuralPartialEq for TypeCondition<'src>
Auto Trait Implementations§
impl<'src> Freeze for TypeCondition<'src>
impl<'src> RefUnwindSafe for TypeCondition<'src>
impl<'src> Send for TypeCondition<'src>
impl<'src> Sync for TypeCondition<'src>
impl<'src> Unpin for TypeCondition<'src>
impl<'src> UnsafeUnpin for TypeCondition<'src>
impl<'src> UnwindSafe for TypeCondition<'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