2 releases

Uses old Rust 2015

0.1.1 Aug 24, 2015
0.1.0 Aug 15, 2015

#90 in #byte-slice

Download history 4352/week @ 2024-07-19 4347/week @ 2024-07-26 4407/week @ 2024-08-02 4341/week @ 2024-08-09 5032/week @ 2024-08-16 5769/week @ 2024-08-23 5689/week @ 2024-08-30 6811/week @ 2024-09-06 6556/week @ 2024-09-13 7181/week @ 2024-09-20 5903/week @ 2024-09-27 7337/week @ 2024-10-04 7109/week @ 2024-10-11 7567/week @ 2024-10-18 8122/week @ 2024-10-25 7835/week @ 2024-11-01

32,334 downloads per month
Used in 9 crates (3 directly)

MIT license

2KB

byte_conv

Conversions between types and byte slices.

Example:

use byte_conv::{As as AsBytes,From as FromBytes};

// Convert to bytes
println!("{:?}",258i32.as_bytes());
//Example output: "[2, 1, 0, 0]" or "[0, 0, 1, 2]"

//Convert from bytes
println!("{:?}",unsafe{i32::from_bytes(&[0,0,0,1u8] as &[u8])});
//Example output: "16777216" or "1"

No runtime deps