Crate bounded_integer[−][src]
Provides a macro to generate bounded integers, integers which are restricted to a range of values.
This crate provides the bounded_integer macro to generate bounded integers, as well as
examples (behind the example feature which isn’t activated by default).
The integers generated from bounded-integer depend only on libcore and so work in #![no_std]
environments.
Features
serde: ImplementSerializeandDeserializefor the bounded integers, making sure all values will never be out of bounds.step_trait: Implement the unstablecore::iter::Steptrait which allows the bounded integers to be easily used in ranges. This will require you to use nightly and place#![feature(step_trait, step_trait_ext)]in your crate root.
Modules
| examples | Examples of generated bounded integers and the API they produce. |
Macros
| bounded_integer | Generate a bounded integer type. |