pub enum TypeKind {
Scalar,
Object,
Interface,
Union,
Enum,
InputObject,
List,
NonNull,
}
Expand description
GraphQL type kind
The GraphQL specification defines a number of type kinds - the meta type of a type.
Variants
Scalar
Scalar types
Scalar types appear as the leaf nodes of GraphQL queries. Strings, numbers, and booleans are the built in types, and while it’s possible to define your own, it’s relatively uncommon.
Object
Object types
The most common type to be implemented by users. Objects have fields and can implement interfaces.
Interface
Interface types
Interface types are used to represent overlapping fields between multiple types, and can be queried for their concrete type.
Union
Union types
Unions are similar to interfaces but can not contain any fields on their own.
Enum
Enum types
Like scalars, enum types appear as the leaf nodes of GraphQL queries.
InputObject
Input objects
Represents complex values provided in queries into the system.
List
List types
Represent lists of other types. This library provides implementations for vectors and slices, but other Rust types can be extended to serve as GraphQL lists.
NonNull
Non-null types
In GraphQL, nullable types are the default. By putting a !
after a
type, it becomes non-nullable.
Trait Implementations
sourceimpl<__S: ScalarValue> FromInputValue<__S> for TypeKind
impl<__S: ScalarValue> FromInputValue<__S> for TypeKind
sourcefn from_input_value(v: &InputValue<__S>) -> Option<TypeKind>where
for<'__b> &'__b __S: ScalarRefValue<'__b>,
fn from_input_value(v: &InputValue<__S>) -> Option<TypeKind>where
for<'__b> &'__b __S: ScalarRefValue<'__b>,
sourceimpl<__S> GraphQLType<__S> for TypeKindwhere
__S: ScalarValue,
for<'__b> &'__b __S: ScalarRefValue<'__b>,
impl<__S> GraphQLType<__S> for TypeKindwhere
__S: ScalarValue,
for<'__b> &'__b __S: ScalarRefValue<'__b>,
sourcefn meta<'r>(_: &(), registry: &mut Registry<'r, __S>) -> MetaType<'r, __S>where
__S: 'r,
fn meta<'r>(_: &(), registry: &mut Registry<'r, __S>) -> MetaType<'r, __S>where
__S: 'r,
sourcefn resolve(
&self,
_: &(),
_: Option<&[Selection<'_, __S>]>,
_: &Executor<'_, Self::Context, __S>
) -> Value<__S>
fn resolve(
&self,
_: &(),
_: Option<&[Selection<'_, __S>]>,
_: &Executor<'_, Self::Context, __S>
) -> Value<__S>
sourcefn resolve_field(
&self,
info: &Self::TypeInfo,
field_name: &str,
arguments: &Arguments<'_, S>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_field(
&self,
info: &Self::TypeInfo,
field_name: &str,
arguments: &Arguments<'_, S>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
sourcefn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
sourceimpl<__S: ScalarValue> ToInputValue<__S> for TypeKind
impl<__S: ScalarValue> ToInputValue<__S> for TypeKind
sourcefn to_input_value(&self) -> InputValue<__S>
fn to_input_value(&self) -> InputValue<__S>
impl Eq for TypeKind
impl StructuralEq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.