enumchar 0.1.2

Rust derive macro for enums where each variant is represented by a single char
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (C) 2025 Leandro Lisboa Penz <lpenz@lpenz.org>
// This file is subject to the terms and conditions defined in
// file 'LICENSE', which is part of this source code package.

use enumchar::EnumChar;

#[derive(EnumChar)]
pub enum E {
    #[char('.')]
    Dot,
    Other,
}

fn main() {
    println!("{}", E::Dot);
}