File tree 10 files changed +13
-11
lines changed
10 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ repository = "https://github.com/tomoikey/refined-type"
6
6
readme = " README.md"
7
7
categories = [" accessibility" , " development-tools" , " rust-patterns" ]
8
8
license = " MIT"
9
- version = " 0.5.2 "
9
+ version = " 0.5.3 "
10
10
edition = " 2021"
11
11
12
12
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Original file line number Diff line number Diff line change
1
+ pub use paste;
2
+
3
+ pub use refined:: Refined ;
4
+
1
5
mod refined;
2
6
pub mod result;
3
7
pub mod rule;
4
-
5
- pub use refined:: Refined ;
Original file line number Diff line number Diff line change 15
15
#[ macro_export]
16
16
macro_rules! length_equal {
17
17
( $length: literal) => {
18
- paste:: item! {
18
+ $crate :: paste:: item! {
19
19
/// A type that holds a value satisfying the LengthEqualN rule.
20
20
#[ allow( dead_code) ]
21
21
pub type [ <LengthEqual $length>] <ITEM > = $crate:: Refined <[ <LengthEqualRule $length>] <ITEM >>;
Original file line number Diff line number Diff line change 14
14
#[ macro_export]
15
15
macro_rules! length_greater_than {
16
16
( $length: literal) => {
17
- paste:: item! {
17
+ $crate :: paste:: item! {
18
18
/// A type that holds a value satisfying the LengthGreaterThanN rule.
19
19
#[ allow( dead_code) ]
20
20
pub type [ <LengthGreaterThan $length>] <ITEM > = $crate:: Refined <[ <LengthGreaterThanRule $length>] <ITEM >>;
Original file line number Diff line number Diff line change 15
15
#[ macro_export]
16
16
macro_rules! length_less_than {
17
17
( $length: literal) => {
18
- paste:: item! {
18
+ $crate :: paste:: item! {
19
19
/// A type that holds a value satisfying the LengthLessThanN rule.
20
20
#[ allow( dead_code) ]
21
21
pub type [ <LengthLessThan $length>] <ITEM > = $crate:: Refined <[ <LengthLessThanRule $length>] <ITEM >>;
Original file line number Diff line number Diff line change 2
2
#[ macro_export]
3
3
macro_rules! equal_rule {
4
4
( ( $e: literal, $t: ty) ) => {
5
- paste:: item! {
5
+ $crate :: paste:: item! {
6
6
/// `Equal[N][TYPE]` is a type that indicates that the number is equal to `N`.
7
7
#[ allow( dead_code) ]
8
8
pub type [ <Equal $e $t>] = $crate:: Refined <[ <EqualRule $e $t>] >;
Original file line number Diff line number Diff line change 1
1
macro_rules! even_rule {
2
2
( $t: ty) => {
3
- paste:: item! {
3
+ $crate :: paste:: item! {
4
4
/// `Even[TYPE]` is a type that represents that the number is even.
5
5
#[ allow( dead_code) ]
6
6
pub type [ <Even $t: upper>] = $crate:: Refined <[ <EvenRule $t: upper>] >;
Original file line number Diff line number Diff line change 2
2
#[ macro_export]
3
3
macro_rules! greater_rule {
4
4
( ( $e: literal, $t: ty) ) => {
5
- paste:: item! {
5
+ $crate :: paste:: item! {
6
6
/// `Greater[N][TYPE]` is a type that indicates that the number is greater than `N`.
7
7
#[ allow( dead_code) ]
8
8
pub type [ <Greater $e $t>] = $crate:: Refined <[ <GreaterRule $e $t>] >;
Original file line number Diff line number Diff line change 2
2
#[ macro_export]
3
3
macro_rules! less_rule {
4
4
( ( $e: literal, $t: ty) ) => {
5
- paste:: item! {
5
+ $crate :: paste:: item! {
6
6
/// `Less[N][TYPE]` is a type that indicates that the number is less than `N`.
7
7
#[ allow( dead_code) ]
8
8
pub type [ <Less $e $t>] = $crate:: Refined <[ <LessRule $e $t>] >;
Original file line number Diff line number Diff line change 1
1
macro_rules! odd_rule {
2
2
( $t: ty) => {
3
- paste:: item! {
3
+ $crate :: paste:: item! {
4
4
/// `Odd[TYPE]` is a type that represents that the number is odd.
5
5
pub type [ <Odd $t: upper>] = $crate:: Refined <[ <OddRule $t: upper>] >;
6
6
/// Rule where the number is odd
You can’t perform that action at this time.
0 commit comments