[−][src]Struct juniper::meta::Field
Metadata for a field
Methods
impl<'a, S> Field<'a, S>
[src]
pub fn description(self, description: &str) -> Self
[src]
Set the description of the field
This overwrites the description if any was previously set.
pub fn push_docstring(self, multiline: &[&str]) -> Field<'a, S>
[src]
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.
pub fn argument(self, argument: Argument<'a, S>) -> Self
[src]
Add an argument to the field
Arguments are unordered and can't contain duplicates by name.
pub fn deprecated(self, reason: Option<&str>) -> Self
[src]
Set the field to be deprecated with an optional reason.
This overwrites the deprecation reason if any was previously set.
Trait Implementations
impl<'a, S: 'a> GraphQLType<S> for Field<'a, S> where
S: ScalarValue,
&'__b S: ScalarRefValue<'__b>,
[src]
S: ScalarValue,
&'__b S: ScalarRefValue<'__b>,
type Context = SchemaType<'a, S>
The expected context type for this GraphQL type Read more
type TypeInfo = ()
Type that may carry additional schema information Read more
fn name(_: &Self::TypeInfo) -> Option<&str>
[src]
fn meta<'r>(
info: &Self::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S> where
&'__b S: ScalarRefValue<'__b>,
S: 'r,
[src]
info: &Self::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S> where
&'__b S: ScalarRefValue<'__b>,
S: 'r,
fn concrete_type_name(&self, _: &Self::Context, _: &Self::TypeInfo) -> String
[src]
fn resolve_field(
&self,
info: &Self::TypeInfo,
field: &str,
args: &Arguments<S>,
executor: &Executor<Self::Context, S>
) -> ExecutionResult<S>
[src]
&self,
info: &Self::TypeInfo,
field: &str,
args: &Arguments<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>
[src]
&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
fn resolve(
&self,
info: &Self::TypeInfo,
selection_set: Option<&[Selection<S>]>,
executor: &Executor<Self::Context, S>
) -> Value<S>
[src]
&self,
info: &Self::TypeInfo,
selection_set: Option<&[Selection<S>]>,
executor: &Executor<Self::Context, S>
) -> Value<S>
Resolve the provided selection set against the current object. Read more
impl<'a, S: Clone> Clone for Field<'a, S>
[src]
fn clone(&self) -> Field<'a, S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, S: Debug> Debug for Field<'a, S>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,