Crate bounded_integer_plugin [] [src]

Provides the procedural macro bounded_integer! for generating enums for the bounded-integer crate.

Syntax

The syntax parsed by bounded_integer! is roughly equivalent to the following macro_rules!-like matcher.

$(#[$attr:meta])*
$(pub)? enum $name:ident: $repr:ident { $min:expr...$max:expr }

Which expands to the following:

$(#[$attr:meta])*
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[repr($repr)]
$(pub)? enum $name { ... }
bounded_integer_impls!($name, $repr, ..., ...);

Where ... are variants of the form ...N1, Z0, P1....

Note that the bounded_integer_impls! macro is provided by the bounded-integer crate.

Structs

IntLit

Signed integer literal.

IntegerEnum

Parsed bounded integer enum.

Functions

expand_bounded_integer

Expands the bounded_integer! macro.

plugin_registrar

Registers the bounded_integer! macro.