#field #rename-rule

ident_case

Utility for applying case rules to Rust identifiers

2 stable releases

Uses old Rust 2015

1.0.1 Mar 18, 2019
1.0.0 May 10, 2017

#224 in Text processing

Download history 1890302/week @ 2025-02-04 1897035/week @ 2025-02-11 1938697/week @ 2025-02-18 2030352/week @ 2025-02-25 2413658/week @ 2025-03-04 2354445/week @ 2025-03-11 2753102/week @ 2025-03-18 2536649/week @ 2025-03-25 2245464/week @ 2025-04-01 2328155/week @ 2025-04-08 1937182/week @ 2025-04-15 2023972/week @ 2025-04-22 1906372/week @ 2025-04-29 2035140/week @ 2025-05-06 2051715/week @ 2025-05-13 1707576/week @ 2025-05-20

8,035,803 downloads per month
Used in 12,146 crates (22 directly)

MIT/Apache

9KB
122 lines

Crate for changing case of Rust identifiers.

Features

  • Supports snake_case, lowercase, camelCase, PascalCase, SCREAMING_SNAKE_CASE, and kebab-case
  • Rename variants, and fields

Examples

use ident_case::RenameRule;

assert_eq!("helloWorld", RenameRule::CamelCase.apply_to_field("hello_world"));

assert_eq!("i_love_serde", RenameRule::SnakeCase.apply_to_variant("ILoveSerde"));

Build Status

Crate for manipulating case of identifiers in Rust programs.

Features

  • Supports snake_case, lowercase, camelCase, PascalCase, SCREAMING_SNAKE_CASE, and kebab-case
  • Rename variants, and fields

Examples

assert_eq!("helloWorld", RenameRule::CamelCase.apply_to_field("hello_world"));

assert_eq!("i_love_serde", RenameRule::SnakeCase.apply_to_variant("ILoveSerde"));

No runtime deps