Struct print_bytes::ByteStr
source · pub struct ByteStr<'a>(_);Expand description
A value returned by ToBytes::to_bytes.
This struct is usually initialized by calling the above method for
[u8].
Implementations§
source§impl<'a> ByteStr<'a>
impl<'a> ByteStr<'a>
sourcepub fn from_utf8_lossy(string: &'a [u8]) -> Self
Available on Windows only.
pub fn from_utf8_lossy(string: &'a [u8]) -> Self
Wraps a byte string lossily.
This method can be used to implement ToBytes::to_bytes when
ToBytes::to_wide is the better way to represent the string.