Registry / utility / byte-slice-cast

byte-slice-cast

JSON →
library1.2.3rscratesunverified

Safely cast bytes slices from/to slices of built-in fundamental numeric types

# Cargo.toml [dependencies] byte-slice-cast = "1.2.3"
INSTALL
IMPORT
SIG · BYTE-SLICE-CAST
B
byte-slice-cast
utilityrustv1.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.

AsByteSlice
use byte_slice_cast::AsByteSlice;

Cast a slice of u32 to a byte slice

use byte_slice_cast::AsByteSlice; let numbers: &[u32] = &[1, 2, 3]; let bytes: &[u8] = numbers.as_byte_slice(); println!("{:?}", bytes);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
byte-slice-cast — cargo add byte-slice-cast · libregistry