Struct apollo_compiler::ast::InputValueDefinition
source · pub struct InputValueDefinition {
pub description: Option<NodeStr>,
pub name: Name,
pub ty: Node<Type>,
pub default_value: Option<Node<Value>>,
pub directives: DirectiveList,
}
Fields§
§description: Option<NodeStr>
§name: Name
§ty: Node<Type>
§default_value: Option<Node<Value>>
§directives: DirectiveList
Implementations§
source§impl InputValueDefinition
impl InputValueDefinition
sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Returns true if usage sites are required to provide a value for this input value.
That means:
- its type is non-null, and
- it does not have a default value
Trait Implementations§
source§impl Clone for InputValueDefinition
impl Clone for InputValueDefinition
source§fn clone(&self) -> InputValueDefinition
fn clone(&self) -> InputValueDefinition
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 Debug for InputValueDefinition
impl Debug for InputValueDefinition
source§impl Display for InputValueDefinition
impl Display for InputValueDefinition
Serialize to GraphQL syntax with the default configuration
source§impl Hash for InputValueDefinition
impl Hash for InputValueDefinition
source§impl PartialEq for InputValueDefinition
impl PartialEq for InputValueDefinition
source§fn eq(&self, other: &InputValueDefinition) -> bool
fn eq(&self, other: &InputValueDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InputValueDefinition
impl StructuralPartialEq for InputValueDefinition
Auto Trait Implementations§
impl Freeze for InputValueDefinition
impl RefUnwindSafe for InputValueDefinition
impl Send for InputValueDefinition
impl Sync for InputValueDefinition
impl Unpin for InputValueDefinition
impl UnwindSafe for InputValueDefinition
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.