Registry / utility / az
library1.3.0rscratesunverified

Casts and checked casts for numeric types.

# Cargo.toml [dependencies] az = "1.3.0"
INSTALL
IMPORT
SIG · AZ
A
az
utilityrustv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cast
use az::Cast;

Casts a u32 to u8 using the Cast trait, panicking if the value does not fit.

use az::Cast; let x: u32 = 42; let y: u8 = x.cast(); // safe cast, panics if out of range println!("{}", y);
Debug
Known issues
gotchaChecked casts panic on overflow; use checked_cast for safe behavior.
fix
Use az::CheckedCast and checked_cast() to handle overflow gracefully.
affects: all
Upgrade
Version history
1.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
2
Meta
1
Resources
az — cargo add az · libregistry