[][src]Trait async_graphql::Type

pub trait Type {
    fn type_name() -> Cow<'static, str>;
fn create_type_info(registry: &mut Registry) -> String; fn qualified_type_name() -> String { ... }
fn global_id(id: ID) -> ID { ... }
fn from_global_id(id: ID) -> Result<ID> { ... } }

Represents a GraphQL type

All GraphQL types implement this trait, such as Scalar, Object, Union ...

Required methods

fn type_name() -> Cow<'static, str>

Type the name.

fn create_type_info(registry: &mut Registry) -> String

Create type information in the registry and return qualified typename.

Loading content...

Provided methods

fn qualified_type_name() -> String

Qualified typename.

fn global_id(id: ID) -> ID

Returns a GlobalID that is unique among all types.

fn from_global_id(id: ID) -> Result<ID>

Parse GlobalID.

Loading content...

Implementations on Foreign Types

impl<'_, T: Type + Send + Sync> Type for &'_ T[src]

impl Type for bool[src]

impl Type for DateTime<Utc>[src]

impl Type for f32[src]

impl Type for f64[src]

impl Type for i8[src]

impl Type for i16[src]

impl Type for i32[src]

impl Type for i64[src]

impl Type for u8[src]

impl Type for u16[src]

impl Type for u32[src]

impl Type for u64[src]

impl Type for String[src]

impl<'a> Type for &'a str[src]

impl Type for Url[src]

impl Type for ObjectId[src]

impl Type for Uuid[src]

impl<T: Type> Type for Vec<T>[src]

impl<'_, T: Type> Type for &'_ [T][src]

impl<T: Type> Type for Option<T>[src]

Loading content...

Implementors

impl Type for EmptyEdgeFields[src]

impl Type for EmptyMutation[src]

impl Type for EmptySubscription[src]

impl Type for ID[src]

impl<'a> Type for Upload[src]

impl<T: OutputValueType + Send + Sync, E: ObjectType + Sync + Send> Type for Connection<T, E>[src]

Loading content...