Struct apollo_encoder::InputField [−][src]
pub struct InputField { /* fields omitted */ }Expand description
Input Field in a given Input Object. A GraphQL Input Object defines a set of input fields; the input fields are either scalars, enums, or other input objects. Input fields are similar to Fields, but can have a default value.
Example
use apollo_encoder::{Type_, InputField};
let ty_1 = Type_::NamedType {
name: "CatBreed".to_string(),
};
let mut field = InputField::new("cat".to_string(), ty_1);
field.default(Some("\"Norwegian Forest\"".to_string()));
assert_eq!(field.to_string(), r#" cat: CatBreed = "Norwegian Forest""#);Implementations
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for InputField
impl Send for InputField
impl Sync for InputField
impl Unpin for InputField
impl UnwindSafe for InputField
Blanket Implementations
Mutably borrows from an owned value. Read more