pub enum SchemaType<'a> {
InputObject(&'a SchemaInputObject<'a>),
Object(&'a SchemaObject<'a>),
Union(&'a SchemaUnion<'a>),
Interface(&'a SchemaInterface<'a>),
Scalar(&'a SchemaScalar<'a>),
Enum(&'a SchemaEnum<'a>),
}Expand description
A named type enum that represents all possible GraphQL definition types.
Variants§
InputObject(&'a SchemaInputObject<'a>)
Object(&'a SchemaObject<'a>)
Union(&'a SchemaUnion<'a>)
Interface(&'a SchemaInterface<'a>)
Scalar(&'a SchemaScalar<'a>)
Enum(&'a SchemaEnum<'a>)
Implementations§
Source§impl<'a> SchemaType<'a>
impl<'a> SchemaType<'a>
pub fn name(&self) -> &'a str
pub fn object(&self) -> Option<&'a SchemaObject<'a>>
pub fn input_object(&self) -> Option<&'a SchemaInputObject<'a>>
pub fn interface(&self) -> Option<&'a SchemaInterface<'a>>
pub fn union_type(&self) -> Option<&'a SchemaUnion<'a>>
pub fn input_type(&self) -> Option<InputType<'a>>
pub fn output_type(&self) -> Option<OutputType<'a>>
Trait Implementations§
Source§impl<'a> Clone for SchemaType<'a>
impl<'a> Clone for SchemaType<'a>
Source§fn clone(&self) -> SchemaType<'a>
fn clone(&self) -> SchemaType<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SchemaType<'a>
impl<'a> Debug for SchemaType<'a>
Source§impl<'a> From<&'a SchemaInterface<'a>> for SchemaType<'a>
impl<'a> From<&'a SchemaInterface<'a>> for SchemaType<'a>
Source§fn from(schema_interface: &'a SchemaInterface<'a>) -> Self
fn from(schema_interface: &'a SchemaInterface<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a SchemaObject<'a>> for SchemaType<'a>
impl<'a> From<&'a SchemaObject<'a>> for SchemaType<'a>
Source§fn from(schema_object: &'a SchemaObject<'a>) -> Self
fn from(schema_object: &'a SchemaObject<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a SchemaUnion<'a>> for SchemaType<'a>
impl<'a> From<&'a SchemaUnion<'a>> for SchemaType<'a>
Source§fn from(schema_union: &'a SchemaUnion<'a>) -> Self
fn from(schema_union: &'a SchemaUnion<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<InputType<'a>> for SchemaType<'a>
impl<'a> From<InputType<'a>> for SchemaType<'a>
Source§impl<'a> From<OutputType<'a>> for SchemaType<'a>
impl<'a> From<OutputType<'a>> for SchemaType<'a>
Source§fn from(type_ref: OutputType<'a>) -> Self
fn from(type_ref: OutputType<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for SchemaType<'a>
impl<'a> PartialEq for SchemaType<'a>
impl<'a> Copy for SchemaType<'a>
impl<'a> StructuralPartialEq for SchemaType<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaType<'a>
impl<'a> !RefUnwindSafe for SchemaType<'a>
impl<'a> !Send for SchemaType<'a>
impl<'a> !Sync for SchemaType<'a>
impl<'a> Unpin for SchemaType<'a>
impl<'a> !UnwindSafe for SchemaType<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more