pub struct Response { /* private fields */ }
Implementations
sourceimpl Response
impl Response
sourcepub fn get_flags(&self) -> Flags
pub fn get_flags(&self) -> Flags
Gets flags (and opcodes) in the header of the Name Server response
sourcepub fn get_section_count(&self, section: Section) -> usize
pub fn get_section_count(&self, section: Section) -> usize
Returns a count of how many records exist in the given section
sourcepub fn get_record<T>(
&mut self,
section: Section,
index: usize
) -> Result<Record<T>, Error>where
T: RecordData,
pub 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.
pub fn questions<T>(&mut self) -> RecordItems<'_, T>ⓘNotable traits for RecordItems<'a, T>impl<'a, T: RecordData> Iterator for RecordItems<'a, T> type Item = Record<T>;
where
T: RecordData,
pub fn answers<T>(&mut self) -> RecordItems<'_, T>ⓘNotable traits for RecordItems<'a, T>impl<'a, T: RecordData> Iterator for RecordItems<'a, T> type Item = Record<T>;
where
T: RecordData,
pub fn additional_records<T>(&mut self) -> RecordItems<'_, T>ⓘNotable traits for RecordItems<'a, T>impl<'a, T: RecordData> Iterator for RecordItems<'a, T> type Item = Record<T>;
where
T: RecordData,
Auto Trait Implementations
impl RefUnwindSafe for Response
impl !Send for Response
impl !Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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