pub struct GraphQLField {
pub name: String,
pub field_type: String,
pub required: bool,
pub is_list: bool,
pub description: Option<String>,
pub arguments: Vec<GraphQLArgument>,
}Expand description
GraphQL field definition
Fields§
§name: StringField name
field_type: StringField type
required: boolWhether the field is required (non-null)
is_list: boolWhether the field is a list
description: Option<String>Description
arguments: Vec<GraphQLArgument>Arguments for the field
Implementations§
Source§impl GraphQLField
impl GraphQLField
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Set description
Sourcepub fn add_argument(&mut self, argument: GraphQLArgument)
pub fn add_argument(&mut self, argument: GraphQLArgument)
Add an argument
Trait Implementations§
Source§impl Clone for GraphQLField
impl Clone for GraphQLField
Source§fn clone(&self) -> GraphQLField
fn clone(&self) -> GraphQLField
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 moreAuto Trait Implementations§
impl Freeze for GraphQLField
impl RefUnwindSafe for GraphQLField
impl Send for GraphQLField
impl Sync for GraphQLField
impl Unpin for GraphQLField
impl UnwindSafe for GraphQLField
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