Skip to content

Commit

Permalink
add comments minmax
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoikey committed Oct 29, 2024
1 parent 2beb45e commit 112fc8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rule/number/min_max.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
macro_rules! define_min_max_rule {
($t: ty) => {
$crate::paste::item! {
/// A type that holds a value satisfying the `MinMaxRule`
pub type [<MinMax $t:camel>]<const MIN: $t, const MAX: $t> = $crate::Refined<[<MinMaxRule $t:camel>]<MIN, MAX>>;

/// Rule where the target value must be greater than or equal to `MIN` and less than or equal to `MAX`
pub type [<MinMaxRule $t:camel>]<const MIN: $t, const MAX: $t> = $crate::And![
$crate::Or![$crate::rule::[<EqualRule $t:camel>]<MIN>, $crate::rule::[<GreaterRule $t:camel>]<MIN>],
$crate::Or![$crate::rule::[<EqualRule $t:camel>]<MAX>, $crate::rule::[<LessRule $t:camel>]<MAX>]
Expand Down

0 comments on commit 112fc8a

Please sign in to comment.