Overview

You can create various rules for a certain type, such as phone numbers, addresses, times, and so on. Once you have established the rules, you can easily combine them.

Specifically, if you create rules for non-empty strings and strings composed only of alphabets, you do not need to redefine a new rule for non-empty strings composed only of alphabets.

All rules can be arbitrarily combined and extended as long as the target type matches.

Enjoy a wonderful type life!

Installation

cargo add refined_type

Or add the following to your Cargo.toml:

[dependencies]
refined_type = "x.x.x"