NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
341 stars 57 forks source link

Add a queryable zone tree #286

Closed ximon18 closed 4 months ago

ximon18 commented 5 months ago

This PR adds zonefile/parsed.rs, zonetree/ and related examples/, which together enable, and show a library user how, to go from a zone file in presentation format to an in-memory tree of zones which can be queried to provide an answer, or walked (iterated over).

The tree also supports versioned write operations and a trait based zone implementation allowing for the in-memory tree for a zone to instead be some other (a)synchornous backing store (as demonstrated by the mysql-zone.rs example).

It also simplifies the return type of Service::call() slightly by moving part of the type signature to the Transaction type.