pub trait EnumModel:
Sized
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
// Required methods
fn values() -> Vec<EnumValue>;
fn value_name(&self) -> &'static str;
fn from_name(name: &str) -> Option<Self>;
// Provided method
fn description() -> Option<&'static str> { ... }
}Expand description
A Rust enum that is a GraphQL enum.
Implemented by #[derive(Enum)].
Required Associated Constants§
Required Methods§
Sourcefn value_name(&self) -> &'static str
fn value_name(&self) -> &'static str
The GraphQL name of this value.
Provided Methods§
Sourcefn description() -> Option<&'static str>
fn description() -> Option<&'static str>
The type’s description, if any.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".