Expand description
Overflow-safe numeric guards for copybook-rs.
This crate isolates checked arithmetic and checked narrowing conversions that are performance-sensitive and correctness-critical.
All functions return structured copybook_error::Error values with
domain-specific error codes on overflow.
Functionsยง
- safe_
array_ bound - Safely calculate COBOL array bounds with overflow protection.
- safe_
u64_ to_ u16 - Safely convert
u64tou16with overflow checking. - safe_
u64_ to_ u32 - Safely convert
u64tou32with overflow checking. - safe_
usize_ to_ u32 - Safely convert
usizetou32with overflow checking.