pub struct SchemaField<'a> {
pub name: &'a str,
pub arguments: HashMap<&'a str, SchemaInputField<'a>, DefaultHashBuilder, &'a Bump>,
pub output_type: &'a TypeRef<'a>,
}
Expand description
An object Field type definition.
A field is like a function that given its arguments as input values produces an output value. Reference
Fields§
§name: &'a str
§arguments: HashMap<&'a str, SchemaInputField<'a>, DefaultHashBuilder, &'a Bump>
§output_type: &'a TypeRef<'a>
Implementations§
Source§impl<'a> SchemaField<'a>
impl<'a> SchemaField<'a>
pub fn new( ctx: &'a ASTContext, name: &'a str, output_type: &'a TypeRef<'a>, ) -> Self
pub fn add_argument(&mut self, _ctx: &'a ASTContext, arg: SchemaInputField<'a>)
pub fn get_argument(&self, name: &'a str) -> Option<&SchemaInputField<'a>>
Trait Implementations§
Source§impl<'a> Clone for SchemaField<'a>
impl<'a> Clone for SchemaField<'a>
Source§fn clone(&self) -> SchemaField<'a>
fn clone(&self) -> SchemaField<'a>
Returns a copy 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 SchemaField<'a>
impl<'a> Debug for SchemaField<'a>
Source§impl<'a> PartialEq for SchemaField<'a>
impl<'a> PartialEq for SchemaField<'a>
impl<'a> StructuralPartialEq for SchemaField<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaField<'a>
impl<'a> !RefUnwindSafe for SchemaField<'a>
impl<'a> !Send for SchemaField<'a>
impl<'a> !Sync for SchemaField<'a>
impl<'a> Unpin for SchemaField<'a>
impl<'a> !UnwindSafe for SchemaField<'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