Module scan_rules::scanner [] [src]

This module defines various abstract scanners that can be used to scan other types with particular properties, or under custom parsing rules.

It is also where implementations for existing standard and external types are kept, though these do not appear in the documentation.

Modules

util

Internal utilities for scanner implementations.

Structs

Binary

Scans the given Output type from its binary representation.

Everything

Scans all remaining input into a string.

Hex

Scans the given Output type from its hexadecimal representation.

Ident

Scans a single identifier into a string.

KeyValuePair

An abstract scanner that scans a (K, V) value using the syntax K: V.

Line

Scans everything up to the end of the current line, or the end of the input, whichever comes first. The scanned result does not include the line terminator.

NonSpace

Scans a sequence of non-space characters into a string.

Number

Scans a single number into a string.

Octal

Scans the given Output type from its octal representation.

Word

Scans a single word into a string.

Wordish

Scans a single word-ish thing into a string.

Enums

QuotedString

Scans a quoted string.

Traits

ScanFromBinary

This trait defines scanning a type from a binary representation.

ScanFromHex

This trait defines scanning a type from a hexadecimal representation.

ScanFromOctal

This trait defines scanning a type from an octal representation.

ScanFromStr

This trait defines the interface to a type which can be scanned.

ScanSelfFromStr

This is a convenience trait automatically implemented for all scanners which result in themselves (i.e. ScanFromStr::Output = Self).