Import 'ident_case' crate

Request Document: go/android-rust-importing-crates
For CL Reviewers: go/android3p#cl-review
For Build Team: go/ab-third-party-imports
Bug: http://b/330678664
Test: m libident_case

Change-Id: Id219061fc44b910ee1897bf0d7b5a9df476e5af2
14 files changed
tree: 405add421d7f0cd8df85b1b16372402bfc3ba5a5
  1. src/
  2. .cargo_vcs_info.json
  3. .gitignore
  4. .travis.yml
  5. Android.bp
  6. cargo.metadata
  7. Cargo.toml
  8. cargo_embargo.json
  9. CHANGELOG.md
  10. LICENSE
  11. METADATA
  12. MODULE_LICENSE_APACHE2
  13. OWNERS
  14. README.md
README.md

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"));