Trait 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 &str

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 char

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], 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], _: bool) -> Result<Vec<Match>, Error>

Source§

impl<T: Needle> Needle for &T

Source§

fn check(&self, buf: &[u8], eof: 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,