fn handle_processing_errors(
    processing_result: ProcessingResult<()>,
    response: &mut Writer,
    over_tcp: bool,
) {
    match processing_result {
        Ok(()) => (),
        Err(ProcessingError::ServFail) => reconfigure_as_servfail(response),
        Err(ProcessingError::Truncation) => {
            if over_tcp {
                // We can't ask the client to retry over TCP, since
                // we are already over TCP.
                reconfigure_as_servfail(response);
            } else {
                response.clear_rrs();
                response.set_tc(true);
            }
        }
    }
}
/// Checks `processing_result` and, if it is an error, modifies the
/// response accordingly.
///
/// * If the error is a truncation error and the transport is UDP, the
///   message's RRs are cleared and the TC bit is set.
/// * If the error is a truncation error and the transport is TCP,
///   retrying over TCP won't help. The message is converted into a
///   SERVFAIL response.
/// * For all other errors, the message is converted into a SERVFAIL
///   response.
Checks `processing_result` and, if it is an error, modifies the
response accordingly.

If the error is a truncation error and the transport is UDP, the
message's RRs are cleared and the TC bit is set.
If the error is a truncation error and the transport is TCP,
retrying over TCP won't help. The message is converted into a
SERVFAIL response.
For all other errors, the message is converted into a SERVFAIL
response.
Checks ` processing_result ` and if it is an error modifies the response accordingly . If the error is a truncation error and the transport is UDP the message ' s RRs are cleared and the TC bit is set . If the error is a truncation error and the transport is TCP retrying over TCP won ' t help . The message is converted into a SERVFAIL response . For all other errors the message is converted into a SERVFAIL response .
fn handle_processing_errors(
    processing_result: ProcessingResult<()>,
    response: &mut Writer,
    over_tcp: bool,
) {
    match processing_result {
        Ok(()) => (),
        Err(ProcessingError::ServFail) => reconfigure_as_servfail(response),
        Err(ProcessingError::Truncation) => {
            if over_tcp {
                // We can't ask the client to retry over TCP, since
                // we are already over TCP.
                reconfigure_as_servfail(response);
            } else {
                response.clear_rrs();
                response.set_tc(true);
            }
        }
    }
}
fn handle_processing_errors ( processing_result : ProcessingResult < ( ) > , response : & mut Writer , over_tcp : bool , ) { match processing_result { Ok ( ( ) ) => ( ) , Err ( ProcessingError :: ServFail ) => reconfigure_as_servfail ( response ) , Err ( ProcessingError :: Truncation ) => { if over_tcp { // We can't ask the client to retry over TCP, since // we are already over TCP. reconfigure_as_servfail ( response ) ; } else { response . clear_rrs ( ) ; response . set_tc ( true ) ; } } } }
Checks `processing_result` and, if it is an error, modifies the
response accordingly.
Checks ` processing_result ` and if it is an error modifies the response accordingly .
processing_result
ProcessingResult<()>
response
&mut Writer
over_tcp
bool
processing_result
ProcessingResult<()>
response
&mut Writer
over_tcp
bool