Files
Martin HoffmannandGitHub cd88889557 Redesign zone file parsing. (#142)
This commit completely redesigns zone file parsing. The primary change is to
convert the scanner into a trait in order to allow multiple zone parser
implementations for different sources and purposes. A number of changes had
to be made in order to make this possible.

The commit also contains an initial implementation of a scanner that modifies
data in-place and can thus returned parsed data with only a minimal amount
of additional allocations. While working, this scanner is more a
proof-of-concept at this point to ensure that the API design is sound.

This commit is based on ideas and code proposed by @not-my-profile in #106.

This commit increases the minimal supported Rust version to 1.59.0.
2022-11-07 15:11:36 +01:00

33 lines
568 B
YAML

origin: example.com.
zonefile: |
example.com. 3600 IN TXT foo bar
example.com. 3600 IN TXT "foo bar"
example.com. 3600 IN TXT "foo""bar"
example.com. 3600 IN TXT f\oo f\111o "foo\""
result:
- owner: example.com.
class: IN
ttl: 3600
data: !Txt
- foo
- bar
- owner: example.com.
class: IN
ttl: 3600
data: !Txt
- foo bar
- owner: example.com.
class: IN
ttl: 3600
data: !Txt
- foo
- bar
- owner: example.com.
class: IN
ttl: 3600
data: !Txt
- foo
- foo
- foo"