pub struct RequireDirective<'a> {
pub field: &'a str,
}
Expand description
The composite spec @require
directive, but in the context of a federated schema. Not to be confused with the federation @requires
directive.
Reference: https://github.com/graphql/composite-schemas-spec/blob/main/spec/Section%202%20–%20Source%20Schema.md#require
Fields§
§field: &'a str
Trait Implementations§
Source§impl<'a> ValueDeserialize<'a> for RequireDirective<'a>
impl<'a> ValueDeserialize<'a> for RequireDirective<'a>
fn deserialize(input: DeserValue<'a>) -> Result<Self, Error>
Source§fn default_when_missing() -> Option<Self>
fn default_when_missing() -> Option<Self>
Provides a default in the case where a field of this type is missing
Auto Trait Implementations§
impl<'a> Freeze for RequireDirective<'a>
impl<'a> RefUnwindSafe for RequireDirective<'a>
impl<'a> Send for RequireDirective<'a>
impl<'a> Sync for RequireDirective<'a>
impl<'a> Unpin for RequireDirective<'a>
impl<'a> UnwindSafe for RequireDirective<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more