Trait Pattern

Source
pub trait Pattern {
    // Required method
    fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>;
}
Expand description

Pattern used to split a NormalizedString

Required Methods§

Source

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Slice the given string in a list of pattern match positions, with a boolean indicating whether this is a match or not.

This method must cover the whole string in its outputs, with contiguous ordered slices.

Implementations on Foreign Types§

Source§

impl Pattern for &str

Source§

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Source§

impl Pattern for &String

Source§

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Source§

impl Pattern for &Regex

Source§

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Source§

impl Pattern for &Regex

Source§

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Source§

impl Pattern for char

Source§

fn find_matches(&self, inside: &str) -> Result<Vec<(Offsets, bool)>>

Implementors§

Source§

impl Pattern for &SysRegex

Source§

impl<F> Pattern for F
where F: Fn(char) -> bool,

Source§

impl<P: Pattern> Pattern for Invert<P>