use std::fmt;
use crate::parse::application::protocols::dns::utils::{dns_class::DnsClass, dns_types::DnsType};
#[derive(Debug)]
pub struct Answer {
name: String, answer_type: DnsType, answer_class: DnsClass, ttl: u32, data_length: u16, address: Vec<u8>, }
impl fmt::Display for Answer {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"Answer {{ name: {}, answer_type: {}, answer_class: {}, ttl: {}, data_length: {}, address: {:?} }}",
self.name,
self.answer_type,
self.answer_class,
self.ttl,
self.data_length,
self.address
)
}
}