2 releases

Uses old Rust 2015

0.1.1 Aug 24, 2015
0.1.0 Aug 15, 2015

#2853 in Rust patterns

Download history 2972/week @ 2024-04-07 3159/week @ 2024-04-14 3212/week @ 2024-04-21 2908/week @ 2024-04-28 3265/week @ 2024-05-05 4098/week @ 2024-05-12 3483/week @ 2024-05-19 3220/week @ 2024-05-26 3993/week @ 2024-06-02 3306/week @ 2024-06-09 3849/week @ 2024-06-16 3729/week @ 2024-06-23 3566/week @ 2024-06-30 4078/week @ 2024-07-07 3543/week @ 2024-07-14 4358/week @ 2024-07-21

15,678 downloads per month
Used in 8 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