Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rust convention: words in file names separated by underscores. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- rust_decimal = "1" resolved to 1.0.0 under minimal-versions (Decimal::ZERO absent); pinned to 1.26 where all used constants exist - non_empty_string was misplaced in mod.rs causing cargo fmt failure; reordered lexicographically Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
codegresscom
approved these changes
Apr 20, 2026
This was
linked to
issues
Apr 20, 2026
Closed
vhrcgcom
pushed a commit
that referenced
this pull request
Apr 21, 2026
Add primitives module (v0.3.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the full
primitivesmodule (v0.3.0) — 10 value objects with validation, normalisation, and serde support.NonEmptyStringBoundedString<MIN, MAX>PositiveInti64 > 0NonNegativeInti64 >= 0PositiveDecimalDecimal > 0NonNegativeDecimalDecimal >= 0Probabilityf64in[0.0, 1.0], NaN/inf rejectedHexColor#RRGGBB/#RGB, expanded + uppercased;.r()/.g()/.b()Locale_→-, lang lowercase, region uppercaseBase64String.decode() -> Vec<u8>New optional dependency:
base64 = "0.22"(MSRV 1.65, within our 1.85 requirement).rust_decimal(already optional dep) pinned to1.26and added toprimitivesfeature.Closes #66
Closes #67
Closes #68
Closes #69
Closes #70
Closes #71
Closes #72
Closes #73
Closes #75
Closes #77
Type of change
Checklist
cargo fmt— code is formattedcargo clippy --features full,serde -- -Dclippy::all— no warningscargo test --features full,serde— all tests pass (108/108)# Exampleblock