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:
- 1.x: https://github.com/Kimundi/pattern_api_sketch
- 2.0: https://github.com/Kimundi/rust_pattern_api_v2 (description)
This module extends up on “Pattern 1.5”, except:
- The trait
SearchPtrs
is renamed toHaystack
(similar to 2.0’sPatternHaystack
) - The associated type
Cursor
is split intoStartCursor
andEndCursor
for extra type safety when working with OMG-WTF-8 strings. - 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 |