Trait expectrl::Needle

source ·
pub trait Needle {
    // Required method
    fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>;
}
Expand description

Needle an interface for search of a match in a buffer.

Required Methods§

source

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

Function returns all matches that were occured.

Trait Implementations§

source§

impl Needle for Box<dyn Needle + '_>

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

Function returns all matches that were occured.

Implementations on Foreign Types§

source§

impl Needle for char

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for Box<dyn Needle + '_>

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for String

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for &[u8]

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for u8

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for &str

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl<T: Needle> Needle for &T

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for str

source§

fn check(&self, buf: &[u8], eof: bool) -> Result<Vec<Match>, Error>

source§

impl Needle for [u8]

source§

fn check(&self, buf: &[u8], _: bool) -> Result<Vec<Match>, Error>

Implementors§

source§

impl Needle for Eof

source§

impl Needle for NBytes

source§

impl<Re: AsRef<str>> Needle for Regex<Re>

source§

impl<T> Needle for Any<&[T]>where T: Needle,

source§

impl<T> Needle for Any<Vec<T>>where T: Needle,

source§

impl<T, const N: usize> Needle for Any<&[T; N]>where T: Needle,

source§

impl<T, const N: usize> Needle for Any<[T; N]>where T: Needle,