ddns/core/parser/record/txt.rs
1use std::ops::Deref;
2
3#[derive(Debug, PartialEq, Eq, Hash, Clone)]
4pub struct Txt {
5 bytes: Vec<u8>,
6}
7
8impl Deref for Txt {
9 type Target = [u8];
10
11 fn deref(&self) -> &Self::Target {
12 &self.bytes
13 }
14}
15
16impl Txt {
17 pub fn new(bytes: Vec<u8>) -> Self {
18 Self { bytes }
19 }
20}