You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: response_code.rs
    path of file: ./repos/phaser/phaser/vendor/trust-dns-proto/src/op
    
    the code of the file until where you have to start completion: /*
 * Copyright (C) 2015 Benjamin Fry <benjaminfry@me.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// there is not much to format in this file, and we don't want rustfmt to mess up the comments

//! All defined response codes in DNS

use std::fmt;
use std::fmt::{Display, Formatter};

/// The status code of the response to a query.
///
/// [RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987](https://tools.ietf.org/html/rfc1035)
///
/// ```text
/// RCODE           Response code - this 4 bit field is set as part of
///                 responses.  The values have the following
///                 interpretation:
///
///                 0               No error condition
///
///                 1               Format error - The name server was
///                                 unable to interpret the query.
///
///                 2               Server failure - The name server was
///                                 unable to process this query due to a
///                                 problem with the name server.
///
///                 3               Name E
    
    fn from(value: u16) -> Self {
        match value {
            0 => ResponseCode::NoError, // 0    NoError    No Error                             [RFC1035]
            1 => ResponseCode::FormErr, // 1    FormErr    Format Error                         [RFC1035]
            2 => ResponseCode::ServFail, // 2    ServFail   Server Failure                       [RFC1035]
            3 => ResponseCode::NXDomain, // 3    NXDomain   Non-Existent Domain                  [RFC1035]
            4 => ResponseCode::NotImp, // 4    NotImp     Not Implemented                      [RFC1035]
            5 => ResponseCode::Refused, // 5    Refused    Query Refused                        [RFC1035]
            6 => ResponseCode::YXDomain, // 6    YXDomain   Name Exists when it should not       [RFC2136][RFC6672]
            7 => ResponseCode::YXRRSet, // 7    YXRRSet    RR Set Exists when it should not     [RFC2136]
            8 => ResponseCode::NXRRSet, // 8    NXRRSet    RR Set that should exist does not    [RFC2136]
            9 => ResponseCode::NotAuth, // 9    NotAuth    Server Not Authoritative for zone    [RFC2136]
            10 => ResponseCode::NotZone, // 10   NotZone    Name not contained in zone           [RFC2136]
            // this looks to be backwards compat for 4 bit ResponseCodes.
            // 16    BADVERS    Bad OPT Version    [RFC6891]
            // 16 => ResponseCode::BADVERS,
            16 => ResponseCode::BADSIG, // 16    BADSIG    TSIG Signature Failure               [RFC2845]
            17 => ResponseCode::BADKEY, // 17    BADKEY    Key not recognized                   [RFC2845]
            18 => ResponseCode::BADTIME, // 18    BADTIME   Signature out of time window         [RFC2845]
            19 => ResponseCode::BADMODE, // 19    BADMODE   Bad TKEY Mode                        [RFC2930]
            20 => ResponseCode::BADNAME, // 20    BADNAME   Duplicate key name                   [RFC2930]
            21 => ResponseCode::BADALG, // 21    BADALG    Algorithm not supported              [RFC2930]
            22 => ResponseCode::BADTRUNC, // 22    BADTRUNC  Bad Truncation                       [RFC4635]
            23 => ResponseCode::BADCOOKIE, // 23    BADCOOKIE (TEMPORARY - registered 2015-07-26, expires 2016-07-26)    Bad/missing server cookie    [draft-ietf-dnsop-cookies]
            code => ResponseCode::Unknown(code),
        }
    }