Trait csv::BorrowBytes
[−]
[src]
pub trait BorrowBytes { fn borrow_bytes<'a>(&'a self) -> &'a [u8]; }
A trait that permits borrowing byte vectors.
This is useful for providing an API that can abstract over Unicode strings and byte strings.
Required Methods
fn borrow_bytes<'a>(&'a self) -> &'a [u8]
Borrow a byte vector.
Implementors
impl BorrowBytes for String
impl BorrowBytes for str
impl BorrowBytes for ByteString
impl BorrowBytes for [u8]
impl<'a, B: ?Sized> BorrowBytes for Cow<'a, B> where B: BorrowBytes + ToOwned, B::Owned: BorrowBytes
impl<'a, T: ?Sized + BorrowBytes> BorrowBytes for &'a T