Skip to main content

TypeDefinition

Type Alias TypeDefinition 

Source
pub type TypeDefinition = TypeDefinition<'static, String>;

Aliased Type§

pub enum TypeDefinition {
    Scalar(ScalarType<'static, String>),
    Object(ObjectType<'static, String>),
    Interface(InterfaceType<'static, String>),
    Union(UnionType<'static, String>),
    Enum(EnumType<'static, String>),
    InputObject(InputObjectType<'static, String>),
}

Variants§

§

Scalar(ScalarType<'static, String>)

§

Object(ObjectType<'static, String>)

§

Interface(InterfaceType<'static, String>)

§

Union(UnionType<'static, String>)

§

Enum(EnumType<'static, String>)

§

InputObject(InputObjectType<'static, String>)

Implementations§

Source§

impl TypeDefinition

Source

pub fn field_by_name(&self, name: &str) -> Option<&Field>

Source

pub fn input_field_by_name(&self, name: &str) -> Option<&InputValue>

Source§

impl TypeDefinition

Source

pub fn has_sub_type(&self, other_type: &TypeDefinition) -> bool

Source

pub fn has_concrete_sub_type(&self, concrete_type: &TypeDefinition) -> bool

Source§

impl TypeDefinition

Source

pub fn possible_types<'a>( &self, schema: &'a Document, ) -> Vec<&'a TypeDefinition>

Source§

impl TypeDefinition

Source

pub fn name(&self) -> &str

Source

pub fn is_abstract_type(&self) -> bool

Source

pub fn is_leaf_type(&self) -> bool

Source

pub fn is_input_type(&self) -> bool

Source

pub fn is_composite_type(&self) -> bool

Source

pub fn is_object_type(&self) -> bool

Source

pub fn is_union_type(&self) -> bool

Source

pub fn is_enum_type(&self) -> bool

Source

pub fn is_scalar_type(&self) -> bool

Source§

impl TypeDefinition

Source

pub fn fields<'a>(&'a self) -> Option<TypeDefinitionFields<'a>>

Source

pub fn directives(&self) -> Option<&[Directive]>

Trait Implementations§

Source§

impl Hash for TypeDefinition

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more