pub struct SchemaObject<'a> {
pub name: &'a str,
/* private fields */
}
Expand description
An Object type definition.
Most types in GraphQL are objects and define a set of fields and the interfaces they implement. Reference
Fields§
§name: &'a str
Implementations§
Source§impl<'a> SchemaObject<'a>
impl<'a> SchemaObject<'a>
pub fn new(ctx: &'a ASTContext, name: &'a str) -> Self
Trait Implementations§
Source§impl<'a> Clone for SchemaObject<'a>
impl<'a> Clone for SchemaObject<'a>
Source§fn clone(&self) -> SchemaObject<'a>
fn clone(&self) -> SchemaObject<'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 SchemaObject<'a>
impl<'a> Debug for SchemaObject<'a>
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> PartialEq for SchemaObject<'a>
impl<'a> PartialEq for SchemaObject<'a>
Source§impl<'a> SchemaFields<'a> for SchemaObject<'a>
impl<'a> SchemaFields<'a> for SchemaObject<'a>
Source§fn add_field(&mut self, ctx: &'a ASTContext, field: SchemaField<'a>)
fn add_field(&mut self, ctx: &'a ASTContext, field: SchemaField<'a>)
Add a new SchemaField to the list of fields
Source§fn get_fields(
&self,
) -> HashMap<&'a str, &'a SchemaField<'a>, DefaultHashBuilder, &'a Bump>
fn get_fields( &self, ) -> HashMap<&'a str, &'a SchemaField<'a>, DefaultHashBuilder, &'a Bump>
Get a [Map] of all fields on the SchemaObject
Source§impl<'a> SchemaInterfaces<'a> for SchemaObject<'a>
impl<'a> SchemaInterfaces<'a> for SchemaObject<'a>
Source§fn add_interface(&mut self, _ctx: &'a ASTContext, interface: &'a str)
fn add_interface(&mut self, _ctx: &'a ASTContext, interface: &'a str)
Add a new SchemaInterface to the list of implemented interfaces
Source§fn get_interfaces(&self) -> Vec<'a, &'a str>
fn get_interfaces(&self) -> Vec<'a, &'a str>
Get list of implemented SchemaInterfaces
Source§fn implements_interface(&self, schema_interface: &SchemaInterface<'a>) -> bool
fn implements_interface(&self, schema_interface: &SchemaInterface<'a>) -> bool
Checks whether given [ObjectType] is a possible subtype
impl<'a> StructuralPartialEq for SchemaObject<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaObject<'a>
impl<'a> !RefUnwindSafe for SchemaObject<'a>
impl<'a> !Send for SchemaObject<'a>
impl<'a> !Sync for SchemaObject<'a>
impl<'a> Unpin for SchemaObject<'a>
impl<'a> !UnwindSafe for SchemaObject<'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