[−][src]Trait fixed_width::AsByteSlice
A trait to ease converting byte like data into a byte slice. This allows handling these types with one generic function.
Required methods
fn as_byte_slice(&self) -> &[u8]
Borrows self as a slice of bytes.
Implementations on Foreign Types
impl AsByteSlice for String
[src]
fn as_byte_slice(&self) -> &[u8]
[src]
Borrow a String
as &[u8]
impl AsByteSlice for str
[src]
fn as_byte_slice(&self) -> &[u8]
[src]
Borrow a str
as &[u8]
impl AsByteSlice for [u8]
[src]
fn as_byte_slice(&self) -> &[u8]
[src]
Borrow a [u8]
as &[u8]
impl AsByteSlice for Vec<u8>
[src]
fn as_byte_slice(&self) -> &[u8]
[src]
Borrow a Vec<u8>
as &[u8]
impl<'a, T: ?Sized> AsByteSlice for Cow<'a, T> where
T: AsByteSlice + ToOwned,
<T as ToOwned>::Owned: AsByteSlice,
[src]
T: AsByteSlice + ToOwned,
<T as ToOwned>::Owned: AsByteSlice,
fn as_byte_slice(&self) -> &[u8]
[src]
Borrow a Cow
type as &[u8]