Trait Expect

Source
pub trait Expect<T>: Sized {
    // Required method
    fn expect(self, value: &T) -> Option<Self>;
}

Required Methods§

Source

fn expect(self, value: &T) -> Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> Expect<[u8; 1]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 1]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 2]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 2]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 3]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 3]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 4]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 4]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 5]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 5]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 6]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 6]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 7]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 7]) -> Option<Self>

Source§

impl<'a> Expect<[u8; 8]> for &'a [u8]

Source§

fn expect(self, a: &[u8; 8]) -> Option<Self>

Source§

impl<'a, T: PartialEq> Expect<T> for &'a [T]

Source§

fn expect(self, value: &T) -> Option<Self>

Implementors§