Struct doh_client::dns::DnsPacket
source · pub struct DnsPacket { /* private fields */ }Implementations
sourceimpl DnsPacket
impl DnsPacket
pub fn from(buffer: Bytes) -> Result<DnsPacket, DnsParserError>
pub fn from_tid(buffer: Bytes, tid: [u8; 2]) -> Result<DnsPacket, DnsParserError>
pub fn len(&self) -> usize
pub fn get_without_tid(&self) -> Bytes
pub fn get(&self) -> Bytes
pub fn get_tid(&self) -> [u8; 2]
pub fn is_response(&self) -> bool
pub fn get_questions(&self) -> u16
pub fn get_answer(&self) -> u16
pub fn get_additional_records(&self) -> u16
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DnsPacket
impl Send for DnsPacket
impl Sync for DnsPacket
impl Unpin for DnsPacket
impl UnwindSafe for DnsPacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more