Skip to main content

UnionModel

Trait UnionModel 

Source
pub trait UnionModel:
    Sized
    + Send
    + Sync
    + 'static {
    const NAME: &'static str;

    // Provided method
    fn description() -> Option<&'static str> { ... }
}
Expand description

A Rust enum that is a GraphQL union.

Implemented by #[derive(Union)]. The union’s members are still declared on the schema with crate::Schema::union, where the rest of the schema is visible.

Required Associated Constants§

Source

const NAME: &'static str

The GraphQL type name.

Provided Methods§

Source

fn description() -> Option<&'static str>

The type’s description, if any.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§