rustmax::nom

Trait AsBytes

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

Helper trait for types that can be viewed as a byte slice

Required Methods§

Source

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

Casts the input type to a byte slice

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<'a> AsBytes for &'a str

Source§

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

Source§

impl<'a> AsBytes for &'a [u8]

Source§

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

Source§

impl<'a, const N: usize> AsBytes for &'a [u8; N]

Source§

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

Source§

impl<const N: usize> AsBytes for [u8; N]

Source§

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

Implementors§