IntoHaystack

Trait IntoHaystack 

Source
pub trait IntoHaystack<'a, H>
where H: Haystack<'a>,
{ // Required method fn into_haystack(self) -> H; }
Expand description

A trait that is responsible for converting a slice into a stateful Haystack, of type H. The primary intent of this trait is to allow users to avoid creating their own Haystack, instead passing a slice to methods on Regex.

If creating a new Haystack type, this trait should be implemented manually so that all types can be inferred properly.

Required Methods§

Source

fn into_haystack(self) -> H

Creates a new Haystack from self.

Implementations on Foreign Types§

Source§

impl<'a> IntoHaystack<'a, ArcStrStack<'a>> for ArcStr

Source§

impl<'a> IntoHaystack<'a, BStrStack<'a>> for &'a BStr

Source§

impl<'a> IntoHaystack<'a, ByteStack<'a>> for &'a [u8]

Source§

impl<'a> IntoHaystack<'a, StrStack<'a>> for &'a str

Source§

impl<'a, B> IntoHaystack<'a, HipBytStack<'a, B>> for HipByt<'a, B>
where B: Backend,

Source§

impl<'a, B> IntoHaystack<'a, HipStrStack<'a, B>> for HipStr<'a, B>
where B: Backend,

Implementors§