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
sourceimpl FromMeta for RenameAll
impl FromMeta for RenameAll
sourcefn 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 morefn 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. Read more
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 moreimpl Copy for RenameAll
Auto Trait Implementations
impl RefUnwindSafe for RenameAll
impl Send for RenameAll
impl Sync for RenameAll
impl Unpin for RenameAll
impl UnwindSafe for RenameAll
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more