pub trait Constraint {
// Required method
fn valid_range() -> RangeInclusive<i64>;
// Provided method
fn validate(value: i64) -> Result<i64, Error> { ... }
}
Expand description
A trait for defining constraints on Amount
Required Methods§
sourcefn valid_range() -> RangeInclusive<i64>
fn valid_range() -> RangeInclusive<i64>
Returns the range of values that are valid under this constraint
Provided Methods§
Object Safety§
This trait is not object safe.