Module omgwtf8::pattern [] [src]

Pattern API 1.6

This is an extended version of the standard Pattern API which allows OMG-WTF-8 strings be used as a needle. This API is used as a demonstration that OMG-WTF-8 can fit into “Pattern 1.x” API, and thus “2.0” is not needed.

Existing extensions can be found in:

This module extends up on “Pattern 1.5”, except:

  1. The trait SearchPtrs is renamed to Haystack (similar to 2.0’s PatternHaystack)
  2. The associated type Cursor is split into StartCursor and EndCursor for extra type safety when working with OMG-WTF-8 strings.
  3. The associated type Haystack is removed, assuming it is always (Self::StartCursor, Self::EndCursor).

This module does not provide details like next_reject or ReverseSearcher. They are expected to be implemented similarly.

Structs

OmgWtf8Searcher

Searcher for an OMG-WTF-8 substring

SliceElemSearcher

Searcher for a single element in a slice.

Traits

Haystack
Pattern
Searcher