Function lazy_bytes_cast::bytes_cast
[−]
[src]
pub fn bytes_cast<T: ToBytesCast>(bytes: &[u8]) -> Result<T, String>
Converts slice of bytes to an integer.
Note:
This function allows conversion only to types that implements ToBytesCast.
Parameters:
bytes- slice of bytes to convert
Result:
Ok- Converted integer.Err- Insufficient bytes size for a cast.