[][src]Struct trust_dns_server::authority::MessageResponseBuilder

pub struct MessageResponseBuilder<'q> { /* fields omitted */ }

A builder for MessageResponses

Implementations

impl<'q> MessageResponseBuilder<'q>[src]

pub fn new(queries: Option<&'q Queries>) -> MessageResponseBuilder<'q>[src]

Constructs a new Response

Arguments

  • queries - any optional set of Queries to associate with the Response

pub fn edns(&mut self, edns: Edns) -> &mut Self[src]

Associate EDNS with the Response

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
[src]

Constructs the new MessageResponse with associated Header

Arguments

  • header - set of Headers for the Message

pub fn build_no_records(self, header: Header) -> MessageResponse<'q, 'static>[src]

Construct a Response with no associated records

pub fn error_msg(
    self,
    id: u16,
    op_code: OpCode,
    response_code: ResponseCode
) -> MessageResponse<'q, 'static>
[src]

Constructs a new error MessageResponse with associated settings

Arguments

  • id - request id to which this is a response
  • op_code - operation for which this is a response
  • response_code - the type of error

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,