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>
Source§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 moreSource§fn from_none() -> Option<Self>
fn from_none() -> Option<Self>
When a field is omitted from a parent meta-item,
from_none
is used to attempt
recovery before a missing field error is generated. Read moreSource§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.
Source§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.
Source§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 morefn from_expr(expr: &Expr) -> Result<Self, Error>
impl Copy for RenameAll
Auto Trait Implementations§
impl Freeze for RenameAll
impl RefUnwindSafe for RenameAll
impl Send for RenameAll
impl Sync for RenameAll
impl Unpin for RenameAll
impl UnwindSafe for RenameAll
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)