pub struct Argument<'a, S> { /* private fields */ }
Expand description
Metadata for an argument to a field
Implementations
sourceimpl<'a, S> Argument<'a, S>
impl<'a, S> Argument<'a, S>
sourcepub fn description(self, description: &str) -> Self
pub fn description(self, description: &str) -> Self
Set the description of the argument
This overwrites the description if any was previously set.
sourcepub fn push_docstring(self, multiline: &[&str]) -> Argument<'a, S>
pub fn push_docstring(self, multiline: &[&str]) -> Argument<'a, S>
Adds a (multi)line doc string to the description of the field. Any leading or trailing newlines will be removed.
If the docstring contains newlines, repeated leading tab and space characters will be removed from the beginning of each line.
If the description hasn’t been set, the description is set to the provided line. Otherwise, the doc string is added to the current description after a newline.
sourcepub fn default_value(self, default_value: InputValue<S>) -> Self
pub fn default_value(self, default_value: InputValue<S>) -> Self
Set the default value of the argument
This overwrites the description if any was previously set.
Trait Implementations
sourceimpl<'a, S: 'a> GraphQLType<S> for Argument<'a, S>where
S: ScalarValue,
for<'__b> &'__b S: ScalarRefValue<'__b>,
impl<'a, S: 'a> GraphQLType<S> for Argument<'a, S>where
S: ScalarValue,
for<'__b> &'__b S: ScalarRefValue<'__b>,
sourcefn meta<'r>(
info: &Self::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S>where
for<'__b> &'__b S: ScalarRefValue<'__b>,
S: 'r,
fn meta<'r>(
info: &Self::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S>where
for<'__b> &'__b S: ScalarRefValue<'__b>,
S: 'r,
The meta type representing this GraphQL type.
sourcefn concrete_type_name(&self, _: &Self::Context, _: &Self::TypeInfo) -> String
fn concrete_type_name(&self, _: &Self::Context, _: &Self::TypeInfo) -> String
Return the concrete type name for this instance/union. Read more
sourcefn resolve_field(
&self,
info: &Self::TypeInfo,
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_field(
&self,
info: &Self::TypeInfo,
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
Resolve the value of a single field on this type. Read more
sourcefn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
Resolve this interface or union into a concrete type Read more
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for Argument<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Argument<'a, S>where
S: Send,
impl<'a, S> Sync for Argument<'a, S>where
S: Sync,
impl<'a, S> Unpin for Argument<'a, S>where
S: Unpin,
impl<'a, S> UnwindSafe for Argument<'a, S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more