Enum ident_case::RenameRule [−][src]
pub enum RenameRule { None, LowerCase, PascalCase, CamelCase, SnakeCase, ScreamingSnakeCase, KebabCase, }
A casing rule for renaming Rust identifiers.
Variants
No-op rename rule.
Rename direct children to “lowercase” style.
Rename direct children to “PascalCase” style, as typically used for enum variants.
Rename direct children to “camelCase” style.
Rename direct children to “snake_case” style, as commonly used for fields.
Rename direct children to “SCREAMING_SNAKE_CASE” style, as commonly used for constants.
Rename direct children to “kebab-case” style.
Implementations
impl RenameRule
[src]
impl RenameRule
[src]pub fn apply_to_variant<S: AsRef<str>>(&self, variant: S) -> String
[src]
Change case of a PascalCase
variant.
pub fn apply_to_field<S: AsRef<str>>(&self, field: S) -> String
[src]
Change case of a snake_case
field.
Trait Implementations
impl Clone for RenameRule
[src]
impl Clone for RenameRule
[src]fn clone(&self) -> RenameRule
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for RenameRule
[src]
impl Default for RenameRule
[src]impl FromStr for RenameRule
[src]
impl FromStr for RenameRule
[src]impl PartialEq<RenameRule> for RenameRule
[src]
impl PartialEq<RenameRule> for RenameRule
[src]