Registry / utility / safecast

safecast

JSON →
library0.2.3rscratesunverified

Traits to define safe casting between types in Rust.

# Cargo.toml [dependencies] safecast = "0.2.3"
INSTALL
IMPORT
SIG · SAFECAST
S
safecast
utilityrustv0.2.3
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.

SafeCast
✓ use safecast::SafeCast;

Safely cast between numeric types using the SafeCast trait.

use safecast::SafeCast; fn main() { let x: u32 = 42; let y: u64 = x.safe_cast(); println!("Safe cast: {}", y); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
safecast — cargo add safecast · libregistry