fn handle_non_axfr_query<'a>(
    zone: &Zone,
    query: Reader,
    question: Question,
    response_buf: &'a mut [u8],
    over_tcp: bool,
) -> Option<usize> {
    let mut response = Writer::try_from(response_buf).ok()?;
    set_up_response_header(&query, &mut response);
    response.add_question(&question).ok()?;

    let result = if question.qtype == Qtype::ANY {
        answer_any(zone, &question.qname, &mut response)
    } else {
        answer(
            zone,
            &question.qname,
            Type::from(question.qtype),
            &mut response,
        )
    };
    handle_processing_errors(result, &mut response, over_tcp);
    Some(response.finish())
}
/// Handles a non-AXFR DNS query. Returns the length of the DNS response
/// written into `response_buf` or `None` if no response should be sent.
Handles a non-AXFR DNS query. Returns the length of the DNS response
written into `response_buf` or `None` if no response should be sent.
Handles a non - AXFR DNS query . Returns the length of the DNS response written into ` response_buf ` or ` None ` if no response should be sent .
fn handle_non_axfr_query<'a>(
    zone: &Zone,
    query: Reader,
    question: Question,
    response_buf: &'a mut [u8],
    over_tcp: bool,
) -> Option<usize> {
    let mut response = Writer::try_from(response_buf).ok()?;
    set_up_response_header(&query, &mut response);
    response.add_question(&question).ok()?;
    let result = if question.qtype == Qtype::ANY {
        answer_any(zone, &question.qname, &mut response)
    } else {
        answer(
            zone,
            &question.qname,
            Type::from(question.qtype),
            &mut response,
        )
    };
    handle_processing_errors(result, &mut response, over_tcp);
    Some(response.finish())
}
fn handle_non_axfr_query < ' a > ( zone : & Zone , query : Reader , question : Question , response_buf : & ' a mut [ u8 ] , over_tcp : bool , ) -> Option < usize > { let mut response = Writer :: try_from ( response_buf ) . ok ( ) ? ; set_up_response_header ( & query , & mut response ) ; response . add_question ( & question ) . ok ( ) ? ; let result = if question . qtype == Qtype :: ANY { answer_any ( zone , & question . qname , & mut response ) } else { answer ( zone , & question . qname , Type :: from ( question . qtype ) , & mut response , ) } ; handle_processing_errors ( result , & mut response , over_tcp ) ; Some ( response . finish ( ) ) }
Handles a non-AXFR DNS query.
Handles a non - AXFR DNS query .
zone
&Zone
query
Reader
question
Question
response_buf
&'a mut [u8]
over_tcp
bool
zone
&Zone
query
Reader
question
Question
response_buf
&'a mut [u8]
over_tcp
bool