Trait AsBStr

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

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

Required Methods§

Source

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

Casts the input type to a byte slice

Implementations on Foreign Types§

Source§

impl AsBStr for &str

Source§

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

Source§

impl AsBStr for &[u8]

Source§

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

Implementors§

Source§

impl AsBStr for &BStr

Source§

impl<I> AsBStr for LocatingSlice<I>
where I: AsBStr,

Source§

impl<I> AsBStr for Partial<I>
where I: AsBStr,

Source§

impl<I, E> AsBStr for Recoverable<I, E>
where I: Stream + AsBStr,

Available on crate features unstable-recover and std only.
Source§

impl<I, S> AsBStr for Stateful<I, S>
where I: AsBStr,