Trait AsBytes

Source
pub trait AsBytes {
    // Required method
    fn as_bytes(&self) -> &[u8];
}
Expand description

Basically the same as AsRef<u8>, but we want it for OsString and OsStr, too.

Required Methods§

Source

fn as_bytes(&self) -> &[u8]

Implementations on Foreign Types§

Source§

impl AsBytes for str

Source§

fn as_bytes(&self) -> &[u8]

Source§

impl AsBytes for [u8]

Source§

fn as_bytes(&self) -> &[u8]

Source§

impl<T: AsBytes> AsBytes for &T

Source§

fn as_bytes(&self) -> &[u8]

Implementors§