#snake-case

snake_cased

snake_case for struct or enum

1 unstable release

Uses new Rust 2021

0.1.0 Jul 2, 2022

#632 in Rust patterns

Download history 22/week @ 2022-06-28 4/week @ 2022-07-05 8/week @ 2022-07-12 17/week @ 2022-07-19 23/week @ 2022-07-26 20/week @ 2022-08-02 30/week @ 2022-08-09 10/week @ 2022-08-16 26/week @ 2022-08-23 17/week @ 2022-08-30 20/week @ 2022-09-06 11/week @ 2022-09-13 17/week @ 2022-09-20

65 downloads per month
Used in walle-core

MIT license

3KB

snake_cased

features:

  • derive
use snake_cased::{Snaked, SnakedEnum};

#[derive(Snaked)]
struct SnakeCased;

#[derive(SnakedEnum)]
enum AEnum {
    AA,
    Bb,
}

assert_eq!("snake_cased", SnakeCased::snaked());
assert_eq!("a_a", AEnum::AA.snaked_enum());
assert_eq!("bb", AEnum::Bb.snaked_enum());

Dependencies

~95KB