pub trait ResourceBody: Display + Debug {
    // Required methods
    fn real_type(&self) -> DnsType;
    fn pack(
        &self,
        msg: Vec<u8>,
        compression: &mut Option<HashMap<String, usize>>,
        compression_off: usize
    ) -> Result<Vec<u8>, Error>;
    fn unpack(
        &mut self,
        msg: &[u8],
        off: usize,
        length: usize
    ) -> Result<usize, Error>;
}

Required Methods§

source

fn real_type(&self) -> DnsType

source

fn pack( &self, msg: Vec<u8>, compression: &mut Option<HashMap<String, usize>>, compression_off: usize ) -> Result<Vec<u8>, Error>

source

fn unpack( &mut self, msg: &[u8], off: usize, length: usize ) -> Result<usize, Error>

Implementors§