mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-08-30 19:59:37 +02:00
Add support to client transports for requests that may result in multiple
responses. (#377) This adds ComposeRequestMulti and other *Multi types. The main change is to the stream transport, which is the only transport that implements SendRequestMulti.
This commit is contained in:
@@ -439,6 +439,14 @@ impl<Octs: Octets + ?Sized> Message<Octs> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns whether the message has a question that is either AXFR or
|
||||
/// IXFR.
|
||||
pub fn is_xfr(&self) -> bool {
|
||||
self.first_question()
|
||||
.map(|q| matches!(q.qtype(), Rtype::AXFR | Rtype::IXFR))
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Returns the first question, if there is any.
|
||||
///
|
||||
/// The method will return `None` both if there are no questions or if
|
||||
|
||||
Reference in New Issue
Block a user