pub fn is_subtype<'b>(&self, sub_type: &Type<'b>, super_type: &Type<'b>) -> bool {
        use crate::ast::Type::*;

        if super_type == sub_type {
            return true;
        }

        match (super_type, sub_type) {
            (&NonNullNamed(ref super_name), &NonNullNamed(ref sub_name))
            | (&Named(ref super_name), &Named(ref sub_name))
            | (&Named(ref super_name), &NonNullNamed(ref sub_name)) => {
                self.is_named_subtype(sub_name, super_name)
            }
            (&NonNullList(ref super_inner), &NonNullList(ref sub_inner))
            | (&List(ref super_inner), &List(ref sub_inner))
            | (&List(ref super_inner), &NonNullList(ref sub_inner)) => {
                self.is_subtype(sub_inner, super_inner)
            }
            _ => false,
        }
    }
/// If the type is a subtype of another type.
If the type is a subtype of another type.
If the type is a subtype of another type .
pub fn is_subtype<'b>(&self, sub_type: &Type<'b>, super_type: &Type<'b>) -> bool {
        use crate::ast::Type::*;
        if super_type == sub_type {
            return true;
        }
        match (super_type, sub_type) {
            (&NonNullNamed(ref super_name), &NonNullNamed(ref sub_name))
            | (&Named(ref super_name), &Named(ref sub_name))
            | (&Named(ref super_name), &NonNullNamed(ref sub_name)) => {
                self.is_named_subtype(sub_name, super_name)
            }
            (&NonNullList(ref super_inner), &NonNullList(ref sub_inner))
            | (&List(ref super_inner), &List(ref sub_inner))
            | (&List(ref super_inner), &NonNullList(ref sub_inner)) => {
                self.is_subtype(sub_inner, super_inner)
            }
            _ => false,
        }
    }
pub fn is_subtype < ' b > ( & self , sub_type : & Type < ' b > , super_type : & Type < ' b > ) -> bool { use crate :: ast :: Type :: * ; if super_type == sub_type { return true ; } match ( super_type , sub_type ) { ( & NonNullNamed ( ref super_name ) , & NonNullNamed ( ref sub_name ) ) | ( & Named ( ref super_name ) , & Named ( ref sub_name ) ) | ( & Named ( ref super_name ) , & NonNullNamed ( ref sub_name ) ) => { self . is_named_subtype ( sub_name , super_name ) } ( & NonNullList ( ref super_inner ) , & NonNullList ( ref sub_inner ) ) | ( & List ( ref super_inner ) , & List ( ref sub_inner ) ) | ( & List ( ref super_inner ) , & NonNullList ( ref sub_inner ) ) => { self . is_subtype ( sub_inner , super_inner ) } _ => false , } }
If the type is a subtype of another type.
If the type is a subtype of another type .
&self
sub_type
&Type<'b>
super_type
&Type<'b>
&self
sub_type
&Type<'b>
super_type
&Type<'b>