Expand description
Parsing of data from its presentation format.
This module provides the basic machinery to parse DNS data from its standard textual representation, known as the presentation format or, perhaps more commonly, zonefile format. To distinguish this process from parsing data from its binary wire format, we call this process scanning.
The module provides two important traits which should sound familiar to
anyone who has used Serde before: Scan
and Scanner
. A type that
knows how to create a value from its presentation format implements
Scan
. It uses an implementation of the Scanner
trait as the source
of data in presentation format.
This module provides a simple scanner that uses a sequence of strings as its source and can be used to, for instance, read record data from command line arguments. A “proper” scanner is included in the zonefile module.
Structs
- A symbol with an unexpected value was encountered.
- A simple scanner atop an iterator of strings.
- A simple scanner error that just wraps a static str.
- An error happened when reading a symbol.
- An error happened when reading a symbol.
- An iterator over the symbols in a char sequence.
Enums
- The symbols encountered in the remainder of an entry.
- The zone file representation of a single character.
Traits
- A type that helps convert the symbols in presentation format.
- An extension trait to add scanning to foreign types.
- A type that can produce tokens of data in presentation format.
- A type providing error information for a scanner.