Skip to main content

Module interface

Module interface 

Source

Traitsยง

Haystack
A trait used to interface the haystack types use when matching of capturing against a Regex, including tracking progression and slicing captures.
HaystackIter
The main underlying trait for Haystack types, HaystackIter should be implemented on new types that understand slicing and iterating over a haystack that can be sliced into instances of Self::Slice.
HaystackOf
This trait is exactly the same as Haystack, except that it simplifies bounds by requiring that Item = I.
HaystackSlice
A trait representing a slice of the underlying haystack for various Haystack types.
IntoHaystack
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.
OwnedHaystackable
A trait representing an owned, mutable type that can be converted into a Haystack as required. This allows for Regex methods that replace matches or captures from the original Haystack.