INNER CODE UNIT · Rust

from

ogham/dog · dns/src/record/mod.rs:138

    fn from(type_number: u16) -> Self {
        macro_rules! try_record {
            ($record:tt) => {
                if $record::RR_TYPE == type_number {
                    return RecordType::$record;
                }
            }
        }

        try_record!(A);
        try_record!(AAAA);
        try_record!(CAA);
        try_record!(CNAME);
        try_record!(EUI48);
        try_record!(EUI64);
        try_record!(HINFO);
        try_record!(LOC);
        try_record!(MX);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…