Module scan_rules::input [] [src]

This module contains items related to input handling.

The short version is this:

  • Values provided as input to the user-facing scanning macros must implement IntoScanCursor, which converts them into something that implements ScanCursor.

  • The input provided to actual type scanners will be something that implements the ScanInput trait.

IntoScanCursor will be of interest if you are implementing a type which you want to be scannable. StrCursor will be of interest if you want to construct a specialised cursor. ScanCursor will be of interest if you are using a ^..cursor pattern to capture a cursor.

Structs

StrCursor

Basic cursor implementation wrapping a string slice.

Enums

ExactCompare

Marker type used to do exact, byte-for-byte string comparisons.

IgnoreAsciiCase

Marker type used to do ASCII case-insensitive string comparisons.

IgnoreSpace

Ignores all whitespace entirely.

Wordish

Treat any contiguous sequence of "word" characters (according to Unicode's definition of the \w regular expression class) or any other single character as a word.

Traits

IntoScanCursor

Conversion into a ScanCursor.

ScanCursor

This trait defines the interface to input values that can be scanned.

ScanInput

This trait is the interface scanners use to access the input being scanned.

SkipSpace

Defines an interface for skipping whitespace.

SliceWord

Defines an interface for slicing words out of input and literal text.

StrCompare

Defines an interface for comparing two strings for equality.