Skip to main content

Searcher

Trait Searcher 

Source
pub trait Searcher {
    // Required method
    fn search_in(&self, haystack: &[u8]) -> Option<usize>;
}
Expand description

A trait that searches for patterns in byte-strings.

Required Methods§

Source

fn search_in(&self, haystack: &[u8]) -> Option<usize>

Search for something in a byte-string. Returns the starting index of the match, if found.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§