File: README.md

package info (click to toggle)
rust-enumber 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 128 kB
  • sloc: makefile: 4
file content (19 lines) | stat: -rw-r--r-- 583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# enumber

![BSD 3 Clause](https://img.shields.io/github/license/kinnison/enumber.svg)
![Main build status](https://github.com/kinnison/enumber/workflows/main/badge.svg)
![Latest docs](https://docs.rs/enumber/badge.svg)
![Crates.IO](https://img.shields.io/crates/v/enumber.svg)

`enumber` is a procedural macro crate which helps you to work with enums whose
purpose it is to represent numbers (for example when parsing complex binary
logs) or strange wire protocols.

```rust
#[enumber::convert]
pub enum Flags {
    EnableCompression = 1,
    EnableTLS = 2,
    Other(usize),
}
```