Enum juniper::Type [] [src]

pub enum Type<'a> {
    Named(&'a str),
    List(Box<Type<'a>>),
    NonNullNamed(&'a str),
    NonNullList(Box<Type<'a>>),
}

A type literal in the syntax tree

This enum carries no semantic information and might refer to types that do not exist.

Variants

A nullable named type, e.g. String

A nullable list type, e.g. [String]

The list itself is what's nullable, the containing type might be non-null.

A non-null named type, e.g. String!

A non-null list type, e.g. [String]!.

The list itself is what's non-null, the containing type might be null.

Methods

impl<'a> Type<'a>
[src]

Get the name of a named type.

Only applies to named types; lists will return None.

Get the innermost name by unpacking lists

All type literals contain exactly one named type.

Determines if a type only can represent non-null values.

Trait Implementations

impl<'a> Clone for Type<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Eq for Type<'a>
[src]

impl<'a> PartialEq for Type<'a>
[src]

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

This method tests for !=.

impl<'a> Debug for Type<'a>
[src]

Formats the value using the given formatter.

impl<'a> Display for Type<'a>
[src]

Formats the value using the given formatter. Read more