Enum cynic_codegen::RenameAll
source · pub enum RenameAll {
None,
Lowercase,
Uppercase,
PascalCase,
CamelCase,
SnakeCase,
ScreamingSnakeCase,
}Expand description
Rules to rename all fields in an InputObject or variants in an Enum as GraphQL naming conventions usually don’t match rust
Variants§
None
Lowercase
For names that are entirely lowercase in GraphQL: myfield
Uppercase
For names that are entirely uppercase in GraphQL: MYFIELD
PascalCase
For names that are entirely pascal case in GraphQL: MyField
CamelCase
For names that are entirely camel case in GraphQL: myField
SnakeCase
For names that are entirely snake case in GraphQL: my_field
ScreamingSnakeCase
For names that are entirely snake case in GraphQL: MY_FIELD
Trait Implementations§
source§impl FromMeta for RenameAll
impl FromMeta for RenameAll
source§fn from_string(value: &str) -> Result<RenameAll, Error>
fn from_string(value: &str) -> Result<RenameAll, Error>
Create an instance from a string literal in a value position.
fn from_nested_meta(item: &NestedMeta) -> Result<Self, Error>
§fn from_meta(item: &Meta) -> Result<Self, Error>
fn from_meta(item: &Meta) -> Result<Self, Error>
Create an instance from a
syn::Meta by dispatching to the format-appropriate
trait function. This generally should not be overridden by implementers. Read more§fn from_word() -> Result<Self, Error>
fn from_word() -> Result<Self, Error>
Create an instance from the presence of the word in the attribute with no
additional options specified.
§fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
fn from_list(items: &[NestedMeta]) -> Result<Self, Error>
Create an instance from a list of nested meta items.
§fn from_value(value: &Lit) -> Result<Self, Error>
fn from_value(value: &Lit) -> Result<Self, Error>
Create an instance from a literal value of either
foo = "bar" or foo("bar").
This dispatches to the appropriate method based on the type of literal encountered,
and generally should not be overridden by implementers. Read more