Enum juniper::TypeKind[][src]

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
Expand description

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
Expand description

Object types

The most common type to be implemented by users. Objects have fields
and can implement interfaces.

Interface
Expand description

Interface types

Interface types are used to represent overlapping fields between
multiple types, and can be queried for their concrete type.

Union
Expand description

Union types

Unions are similar to interfaces but can not contain any fields on
their own.

Enum
Expand description

Enum types

Like scalars, enum types appear as the leaf nodes of GraphQL queries.

InputObject
Expand description

Input objects

Represents complex values provided in queries into the system.

List
Expand description

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
Expand description

Non-null types

In GraphQL, nullable types are the default. By putting a ! after a
type, it becomes non-nullable.

Trait Implementations

impl Clone for TypeKind[src]

fn clone(&self) -> TypeKind[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for TypeKind[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<__S> FromInputValue<__S> for TypeKind where
    __S: ScalarValue
[src]

fn from_input_value(v: &InputValue<__S>) -> Option<TypeKind>[src]

Performs the conversion.

fn from_implicit_null() -> Self[src]

Performs the conversion from an absent value (e.g. to distinguish between implicit and explicit null). The default implementation just uses from_input_value as if an explicit null were provided. This conversion must not fail. Read more

impl<__S> GraphQLType<__S> for TypeKind where
    __S: ScalarValue
[src]

fn name(_: &()) -> Option<&'static str>[src]

Returns name of this GraphQLType to expose. Read more

fn meta<'r>(_: &(), registry: &mut Registry<'r, __S>) -> MetaType<'r, __S> where
    __S: 'r, 
[src]

Returns MetaType representing this GraphQLType.

impl<__S> GraphQLValue<__S> for TypeKind where
    __S: ScalarValue
[src]

type Context = ()

Context type for this GraphQLValue. Read more

type TypeInfo = ()

Type that may carry additional schema information for this GraphQLValue. Read more

fn type_name<'__i>(&self, info: &'__i Self::TypeInfo) -> Option<&'__i str>[src]

Returns name of the GraphQLType exposed by this GraphQLValue. Read more

fn resolve(
    &self,
    _: &(),
    _: Option<&[Selection<'_, __S>]>,
    _: &Executor<'_, '_, Self::Context, __S>
) -> ExecutionResult<__S>
[src]

Resolves the provided selection_set against this GraphQLValue. Read more

fn resolve_field(
    &self,
    _info: &Self::TypeInfo,
    _field_name: &str,
    _arguments: &Arguments<'_, S>,
    _executor: &Executor<'_, '_, Self::Context, S>
) -> ExecutionResult<S>
[src]

Resolves the value of a single field on this GraphQLValue. Read more

fn resolve_into_type(
    &self,
    info: &Self::TypeInfo,
    type_name: &str,
    selection_set: Option<&[Selection<'_, S>]>,
    executor: &Executor<'_, '_, Self::Context, S>
) -> ExecutionResult<S>
[src]

Resolves this GraphQLValue (being an interface or an union) into a concrete downstream object type. Read more

fn concrete_type_name(
    &self,
    context: &Self::Context,
    info: &Self::TypeInfo
) -> String
[src]

Returns the concrete GraphQLType name for this GraphQLValue being an interface, an union or an object. Read more

impl<__S> GraphQLValueAsync<__S> for TypeKind where
    __S: ScalarValue,
    __S: Send + Sync,
    Self: Sync
[src]

fn resolve_async<'a>(
    &'a self,
    info: &'a Self::TypeInfo,
    selection_set: Option<&'a [Selection<'_, __S>]>,
    executor: &'a Executor<'_, '_, Self::Context, __S>
) -> BoxFuture<'a, ExecutionResult<__S>>
[src]

Resolves the provided selection_set against this GraphQLValueAsync. Read more

fn resolve_field_async<'a>(
    &'a self,
    _info: &'a Self::TypeInfo,
    _field_name: &'a str,
    _arguments: &'a Arguments<'_, S>,
    _executor: &'a Executor<'_, '_, Self::Context, S>
) -> BoxFuture<'a, ExecutionResult<S>>
[src]

Resolves the value of a single field on this GraphQLValueAsync. Read more

fn resolve_into_type_async<'a>(
    &'a self,
    info: &'a Self::TypeInfo,
    type_name: &str,
    selection_set: Option<&'a [Selection<'a, S>]>,
    executor: &'a Executor<'a, 'a, Self::Context, S>
) -> BoxFuture<'a, ExecutionResult<S>>
[src]

Resolves this GraphQLValueAsync (being an interface or an union) into a concrete downstream object type. Read more

impl<__S> IsInputType<__S> for TypeKind where
    __S: ScalarValue
[src]

fn mark()[src]

An arbitrary function without meaning. Read more

impl<__S> IsOutputType<__S> for TypeKind where
    __S: ScalarValue
[src]

fn mark()[src]

An arbitrary function without meaning. Read more

impl PartialEq<TypeKind> for TypeKind[src]

fn eq(&self, other: &TypeKind) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<__S> ToInputValue<__S> for TypeKind where
    __S: ScalarValue
[src]

fn to_input_value(&self) -> InputValue<__S>[src]

Performs the conversion.

impl Eq for TypeKind[src]

impl StructuralEq for TypeKind[src]

impl StructuralPartialEq for TypeKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V