Skip to main content

ExpectByte

Trait ExpectByte 

Source
pub trait ExpectByte: Sized {
    // Required method
    fn expect_byte_fn<F>(self, f: F) -> Result<Self, Option<u8>>
       where F: Fn(u8) -> bool;

    // Provided method
    fn expect_byte(self, byte: u8) -> Result<Self, Option<u8>> { ... }
}

Required Methods§

Source

fn expect_byte_fn<F>(self, f: F) -> Result<Self, Option<u8>>
where F: Fn(u8) -> bool,

Provided Methods§

Source

fn expect_byte(self, byte: u8) -> Result<Self, Option<u8>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ExpectByte for Option<u8>

Source§

fn expect_byte_fn<F>(self, f: F) -> Result<Self, Option<u8>>
where F: Fn(u8) -> bool,

Source§

impl ExpectByte for u8

Source§

fn expect_byte_fn<F>(self, f: F) -> Result<Self, Option<u8>>
where F: Fn(u8) -> bool,

Implementors§