#snake-case

snake_cased

snake_case for struct or enum

1 unstable release

0.1.0 Jul 2, 2022

#26 in #snake-case

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

~230KB