Description
Implement NonNegativeInt as a ValueObject in the primitives module.
Spec: i64 >= 0
Implementation checklist
Implementation detail
Input / Output
|
Type |
Alias |
| Input |
i64 |
NonNegativeIntInput |
| Output |
i64 |
NonNegativeIntOutput |
Normalization
None.
Validation
- Must be >= 0. Negative values are rejected.
Extra methods
None beyond the trait.
References
Description
Implement
NonNegativeIntas aValueObjectin theprimitivesmodule.Spec:
i64 >= 0Implementation checklist
src/primitives/nonnegativeint.rsValueObjecttrait#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]src/primitives/mod.rsandprelude# ExampleblockROADMAP.mdfrom ⬜ to ✅Implementation detail
Input / Output
i64NonNegativeIntInputi64NonNegativeIntOutputNormalization
None.
Validation
Extra methods
None beyond the trait.
References