refining
Refinement types.
Installation
cargo
You can add refining as a dependency with the following command:
$ cargo add refining
Or by directly specifying it in the configuration like so:
[]
= "0.1.0"
Alternatively, you can add it directly from the source:
[]
= "https://github.com/nekitdev/refining.git"
Examples
use fmt;
use Result;
use *;
type_str!;
type_str!;
type Name = ;
type Charge = ;
Running the example will print the following output:
nekit (42%)
Features
The refining crate comes with the following features:
std(enabled by default): depends on the Rust Standard Library (std);empty(enabled by default): providesrefining::emptypredicates;length(enabled by default): providesrefining::lengthpredicates;int(enabled by default): providesrefining::intpredicates;char(enabled by default): providesrefining::charpredicates;str(enabled by default): providesrefining::strpredicates;regex(enabled by default, impliesstd): providesrefining::regexpredicates.
These features can be disabled via the following:
[]
= "0.1.0"
= false
Then only the refining::core module will be available; additional features
can be enabled individually.
Again, note that regex implies std, so it can not be used in no_std environments.
Documentation
You can find the documentation here.
Support
If you need support with the library, you can send an email.
Changelog
You can find the changelog here.
Security Policy
You can find the Security Policy of refining here.
Contributing
If you are interested in contributing to refining, make sure to take a look at the
Contributing Guide, as well as the Code of Conduct.
License
refining is licensed under the MIT License terms. See License for details.