pub enum TypeExtension<'src> {
Enum(EnumTypeExtension<'src>),
InputObject(InputObjectTypeExtension<'src>),
Interface(InterfaceTypeExtension<'src>),
Object(ObjectTypeExtension<'src>),
Scalar(ScalarTypeExtension<'src>),
Union(UnionTypeExtension<'src>),
}Expand description
A type extension in a GraphQL schema.
See Type Extensions in the spec.
Variants§
Enum(EnumTypeExtension<'src>)
InputObject(InputObjectTypeExtension<'src>)
Interface(InterfaceTypeExtension<'src>)
Object(ObjectTypeExtension<'src>)
Scalar(ScalarTypeExtension<'src>)
Union(UnionTypeExtension<'src>)
Implementations§
Source§impl<'src> TypeExtension<'src>
impl<'src> TypeExtension<'src>
Sourcepub fn directive_annotations(&self) -> &[DirectiveAnnotation<'src>]
pub fn directive_annotations(&self) -> &[DirectiveAnnotation<'src>]
Returns the directive annotations applied to this type extension.
Sourcepub fn name_value(&self) -> &str
pub fn name_value(&self) -> &str
Returns the name of this type extension as a string slice.
Convenience accessor for self.name().value.
Source§impl TypeExtension<'_>
impl TypeExtension<'_>
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 extension’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 TypeExtension<'_>
impl AstNode for TypeExtension<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this type extension’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 TypeExtension<'src>
impl<'src> Clone for TypeExtension<'src>
Source§fn clone(&self) -> TypeExtension<'src>
fn clone(&self) -> TypeExtension<'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 TypeExtension<'src>
impl<'src> Debug for TypeExtension<'src>
Source§impl<'src> PartialEq for TypeExtension<'src>
impl<'src> PartialEq for TypeExtension<'src>
impl<'src> StructuralPartialEq for TypeExtension<'src>
Auto Trait Implementations§
impl<'src> Freeze for TypeExtension<'src>
impl<'src> RefUnwindSafe for TypeExtension<'src>
impl<'src> Send for TypeExtension<'src>
impl<'src> Sync for TypeExtension<'src>
impl<'src> Unpin for TypeExtension<'src>
impl<'src> UnsafeUnpin for TypeExtension<'src>
impl<'src> UnwindSafe for TypeExtension<'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