Enum apollo_encoder::Type_ [−][src]
pub enum Type_ {
NonNull {
ty: Box<Type_>,
},
List {
ty: Box<Type_>,
},
NamedType {
name: String,
},
}Expand description
Convenience Type_ implementation used when creating a Field.
Can be a NamedType, a NonNull or a List.
This enum is resposible for encoding creating values such as String!, [[[[String]!]!]!]!, etc.
Example
use apollo_encoder::{Type_};
let field_ty = Type_::NamedType {
name: "String".to_string(),
};
let list = Type_::List {
ty: Box::new(field_ty),
};
let non_null = Type_::NonNull { ty: Box::new(list) };
assert_eq!(non_null.to_string(), "[String]!");Variants
NonNull
The Non-Null field type.
List
The List field type.
NamedType
Fields
name: StringNamedType type.
The Named field type.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Type_
impl UnwindSafe for Type_
Blanket Implementations
Mutably borrows from an owned value. Read more