Trait Bytes

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

Trait for objects which can be turned into bytes

This is mostly an internal API.

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl Bytes for str

Source§

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

Source§

impl Bytes for CStr

Source§

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

Source§

impl Bytes for OsStr

Source§

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

Source§

impl Bytes for Path

Source§

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

Source§

impl Bytes for [u8]

Source§

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

Source§

impl<'a> Bytes for Cow<'a, Ustr>

Source§

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

Implementors§