Enum apollo_compiler::schema::ExtendedType
source · pub enum ExtendedType {
Scalar(Node<ScalarType>),
Object(Node<ObjectType>),
Interface(Node<InterfaceType>),
Union(Node<UnionType>),
Enum(Node<EnumType>),
InputObject(Node<InputObjectType>),
}
Expand description
The definition of a named type, with all information from type extensions folded in.
The source location is that of the “main” definition.
Variants§
Scalar(Node<ScalarType>)
Object(Node<ObjectType>)
Interface(Node<InterfaceType>)
Union(Node<UnionType>)
Enum(Node<EnumType>)
InputObject(Node<InputObjectType>)
Implementations§
source§impl ExtendedType
impl ExtendedType
sourcepub fn location(&self) -> Option<NodeLocation>
pub fn location(&self) -> Option<NodeLocation>
Return the source location of the type’s base definition.
If the type has extensions, those are not covered by this location.
pub fn is_scalar(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_interface(&self) -> bool
pub fn is_union(&self) -> bool
pub fn is_enum(&self) -> bool
pub fn is_input_object(&self) -> bool
sourcepub fn is_input_type(&self) -> bool
pub fn is_input_type(&self) -> bool
Returns true if a value of this type can be used as an input value.
Spec
This implements spec function
IsInputType(type)
sourcepub fn is_output_type(&self) -> bool
pub fn is_output_type(&self) -> bool
Returns true if a value of this type can be used as an output value.
Spec
This implements spec function
IsOutputType(type)
sourcepub fn is_built_in(&self) -> bool
pub fn is_built_in(&self) -> bool
Returns whether this is a built-in scalar or introspection type
pub fn directives(&self) -> &Directives
pub fn description(&self) -> Option<&NodeStr>
Trait Implementations§
source§impl Clone for ExtendedType
impl Clone for ExtendedType
source§fn clone(&self) -> ExtendedType
fn clone(&self) -> ExtendedType
Returns a copy 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 Debug for ExtendedType
impl Debug for ExtendedType
source§impl From<EnumType> for ExtendedType
impl From<EnumType> for ExtendedType
source§impl From<InputObjectType> for ExtendedType
impl From<InputObjectType> for ExtendedType
source§fn from(ty: InputObjectType) -> Self
fn from(ty: InputObjectType) -> Self
Converts to this type from the input type.
source§impl From<InterfaceType> for ExtendedType
impl From<InterfaceType> for ExtendedType
source§fn from(ty: InterfaceType) -> Self
fn from(ty: InterfaceType) -> Self
Converts to this type from the input type.
source§impl From<Node<InputObjectType>> for ExtendedType
impl From<Node<InputObjectType>> for ExtendedType
source§fn from(ty: Node<InputObjectType>) -> Self
fn from(ty: Node<InputObjectType>) -> Self
Converts to this type from the input type.
source§impl From<Node<InterfaceType>> for ExtendedType
impl From<Node<InterfaceType>> for ExtendedType
source§fn from(ty: Node<InterfaceType>) -> Self
fn from(ty: Node<InterfaceType>) -> Self
Converts to this type from the input type.
source§impl From<Node<ObjectType>> for ExtendedType
impl From<Node<ObjectType>> for ExtendedType
source§fn from(ty: Node<ObjectType>) -> Self
fn from(ty: Node<ObjectType>) -> Self
Converts to this type from the input type.
source§impl From<Node<ScalarType>> for ExtendedType
impl From<Node<ScalarType>> for ExtendedType
source§fn from(ty: Node<ScalarType>) -> Self
fn from(ty: Node<ScalarType>) -> Self
Converts to this type from the input type.
source§impl From<ObjectType> for ExtendedType
impl From<ObjectType> for ExtendedType
source§fn from(ty: ObjectType) -> Self
fn from(ty: ObjectType) -> Self
Converts to this type from the input type.
source§impl From<ScalarType> for ExtendedType
impl From<ScalarType> for ExtendedType
source§fn from(ty: ScalarType) -> Self
fn from(ty: ScalarType) -> Self
Converts to this type from the input type.
source§impl From<UnionType> for ExtendedType
impl From<UnionType> for ExtendedType
source§impl PartialEq for ExtendedType
impl PartialEq for ExtendedType
source§fn eq(&self, other: &ExtendedType) -> bool
fn eq(&self, other: &ExtendedType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ExtendedType
impl StructuralEq for ExtendedType
impl StructuralPartialEq for ExtendedType
Auto Trait Implementations§
impl RefUnwindSafe for ExtendedType
impl Send for ExtendedType
impl Sync for ExtendedType
impl Unpin for ExtendedType
impl UnwindSafe for ExtendedType
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.