Expand description
Zero-cost conversion functions for chunkedge_nbt.
While working with Value, it is often necessary to convert between
collections of signed and unsigned integer types due to API
differences. For instance, you may be given a &[i8] from
Value::ByteArray, but functions like Write::write_all expect to
receive a &[u8].
This module provides functions to perform conversions between these types
with zero-cost and no unsafe code on your part.
Functionsยง
- i8_
slice_ as_ u8_ slice - Converts a
&[i8]into a&[u8]. - i8_
vec_ into_ u8_ vec - Converts a
Vec<i8>into aVec<u8>without cloning. - u8_
slice_ as_ i8_ slice - Converts a
&[u8]into a&[i8]. - u8_
vec_ into_ i8_ vec - Converts a
Vec<u8>into aVec<i8>without cloning.