Struct resolv::Response [] [src]

pub struct Response {
    // some fields omitted
}

Methods

impl Response
[src]

fn new(msg: Message, buffer: Box<Vec<u8>>) -> Response

This is for internal use.

fn get_id(&self) -> u16

Gets the ID field of the Name Server response

fn get_flags(&self) -> Flags

Gets flags (and opcodes) in the header of the Name Server response

fn get_section_count(&self, section: Section) -> usize

Returns a count of how many records exist in the given section

fn get_record<T>(&mut self, section: Section, index: usize) -> Result<Record<T>, Error> where T: RecordData

Gets a record from a section. Returns an error if index is out of bounds (use get_section_count()). Also returns an error (at run-time) if assigned into a Record of the wrong type.

fn questions<T>(&mut self) -> RecordItems<T> where T: RecordData

fn answers<T>(&mut self) -> RecordItems<T> where T: RecordData

fn authorities<T>(&mut self) -> RecordItems<T> where T: RecordData

fn additional_records<T>(&mut self) -> RecordItems<T> where T: RecordData