dns_txt

Macro dns_txt 

Source
macro_rules! dns_txt {
    ($value:expr $(, $values:expr)* $(,)?) => { ... };
}
Expand description

Create a new Txt from byte slices. The data will be concatenated and converted to DNS wire format. The maximum length of a single text value is 255 bytes. This macro accepts an expression as input, which is evaluated at compile time. If you want to create a Txt from byte slices of unknown length, use the Txt::new function instead.

ยงExample

use flex_dns::rdata::Txt;
use flex_dns::dns_txt;

const TXT: Txt = dns_txt!(
    b"Hello",
    b"World!"
);