[−][src]Module lazy_bytes_cast::from
Conversions from bytes.
Usage
use lazy_bytes_cast::from::{bytes_cast}; fn main() { let bytes = vec![127, 150, 152, 0]; if let Some(int) = bytes_cast::<u32>(&bytes) { println!("bytes={}", int); } else { println!("Couldn't extract integer from bytes"); } }
Traits
FromBytesCast | Provides casting from bytes slice. |
FromBytesCastLazy | Provides casting from fixed size arrays to integers |
Functions
bytes_cast | Converts slice of bytes to an integer. |
bytes_cast_lazy⚠ | Unsafe version of |