Struct trust_dns_server::authority::MessageResponseBuilder
source · [−]pub struct MessageResponseBuilder<'q> { /* private fields */ }
Expand description
A builder for MessageResponses
Implementations
sourceimpl<'q> MessageResponseBuilder<'q>
impl<'q> MessageResponseBuilder<'q>
sourcepub fn from_message_request(message: &'q MessageRequest) -> Self
pub fn from_message_request(message: &'q MessageRequest) -> Self
Constructs a new response builder
Arguments
message
- original request message to associate with the response
sourcepub fn build<'a, A, N, S, D>(
self,
header: Header,
answers: A,
name_servers: N,
soa: S,
additionals: D
) -> MessageResponse<'q, 'a, A::IntoIter, N::IntoIter, S::IntoIter, D::IntoIter> where
A: IntoIterator<Item = &'a Record> + Send + 'a,
A::IntoIter: Send,
N: IntoIterator<Item = &'a Record> + Send + 'a,
N::IntoIter: Send,
S: IntoIterator<Item = &'a Record> + Send + 'a,
S::IntoIter: Send,
D: IntoIterator<Item = &'a Record> + Send + 'a,
D::IntoIter: Send,
pub fn build<'a, A, N, S, D>(
self,
header: Header,
answers: A,
name_servers: N,
soa: S,
additionals: D
) -> MessageResponse<'q, 'a, A::IntoIter, N::IntoIter, S::IntoIter, D::IntoIter> where
A: IntoIterator<Item = &'a Record> + Send + 'a,
A::IntoIter: Send,
N: IntoIterator<Item = &'a Record> + Send + 'a,
N::IntoIter: Send,
S: IntoIterator<Item = &'a Record> + Send + 'a,
S::IntoIter: Send,
D: IntoIterator<Item = &'a Record> + Send + 'a,
D::IntoIter: Send,
sourcepub fn build_no_records<'a>(
self,
header: Header
) -> MessageResponse<'q, 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a>
pub fn build_no_records<'a>(
self,
header: Header
) -> MessageResponse<'q, 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a>
Construct a Response with no associated records
sourcepub fn error_msg<'a>(
self,
request_header: &Header,
response_code: ResponseCode
) -> MessageResponse<'q, 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a>
pub fn error_msg<'a>(
self,
request_header: &Header,
response_code: ResponseCode
) -> MessageResponse<'q, 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a, impl Iterator<Item = &'a Record> + Send + 'a>
Constructs a new error MessageResponse with associated settings
Arguments
id
- request id to which this is a responseop_code
- operation for which this is a responseresponse_code
- the type of error
Auto Trait Implementations
impl<'q> RefUnwindSafe for MessageResponseBuilder<'q>
impl<'q> Send for MessageResponseBuilder<'q>
impl<'q> Sync for MessageResponseBuilder<'q>
impl<'q> Unpin for MessageResponseBuilder<'q>
impl<'q> UnwindSafe for MessageResponseBuilder<'q>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more