Skip to main content

AsSlice

Trait AsSlice 

Source
pub trait AsSlice: AsPtr + SizedType {
    // Provided methods
    fn as_slice(&self) -> &[u8]  { ... }
    fn as_slice_mut(&mut self) -> &mut [u8]  { ... }
    fn contains(&self, x: &u8) -> bool { ... }
}

Provided Methods§

Source

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

Source

fn as_slice_mut(&mut self) -> &mut [u8]

Source

fn contains(&self, x: &u8) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsSlice for &[u8]

Source§

impl AsSlice for [u8]

Implementors§