Struct apollo_encoder::EnumValue [−][src]
pub struct EnumValue { /* fields omitted */ }Expand description
The __EnumValue type represents one of possible values of an enum.
EnumValueDefinition: Description? EnumValue Directives?
Detailed documentation can be found in GraphQL spec.
Example
use apollo_encoder::{EnumValue};
let mut enum_ty = EnumValue::new("CARDBOARD_BOX".to_string());
enum_ty.description(Some("Box nap spot.".to_string()));
enum_ty.deprecated(Some("Box was recycled.".to_string()));
assert_eq!(
enum_ty.to_string(),
r#" "Box nap spot."
CARDBOARD_BOX @deprecated(reason: "Box was recycled.")"#
);Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EnumValue
impl UnwindSafe for EnumValue
Blanket Implementations
Mutably borrows from an owned value. Read more