Struct flex_dns::question::DnsQuestions
source · pub struct DnsQuestions<const PTR_STORAGE: usize, B: Buffer> { /* private fields */ }Expand description
A DNS message questions section.
Implementations§
source§impl<const PTR_STORAGE: usize, B: Buffer> DnsQuestions<PTR_STORAGE, B>
impl<const PTR_STORAGE: usize, B: Buffer> DnsQuestions<PTR_STORAGE, B>
sourcepub fn iter(&mut self) -> Result<DnsQuestionIterator<'_>, DnsMessageError>
pub fn iter(&mut self) -> Result<DnsQuestionIterator<'_>, DnsMessageError>
Return an iterator over the question section.
sourcepub fn complete(self) -> Result<DnsMessage<PTR_STORAGE, 1, B>, DnsMessageError>
pub fn complete(self) -> Result<DnsMessage<PTR_STORAGE, 1, B>, DnsMessageError>
Complete the message. This will check the remaining questions and return the message if successful.
source§impl<const PTR_STORAGE: usize, B: MutBuffer + Buffer> DnsQuestions<PTR_STORAGE, B>
impl<const PTR_STORAGE: usize, B: MutBuffer + Buffer> DnsQuestions<PTR_STORAGE, B>
sourcepub fn append(
&mut self,
question: DnsQuestion<'_>
) -> Result<(), DnsMessageError>
pub fn append( &mut self, question: DnsQuestion<'_> ) -> Result<(), DnsMessageError>
Append a question to the message. This will override the next question or further sections, if any.
Auto Trait Implementations§
impl<const PTR_STORAGE: usize, B> RefUnwindSafe for DnsQuestions<PTR_STORAGE, B>where B: RefUnwindSafe,
impl<const PTR_STORAGE: usize, B> Send for DnsQuestions<PTR_STORAGE, B>where B: Send,
impl<const PTR_STORAGE: usize, B> Sync for DnsQuestions<PTR_STORAGE, B>where B: Sync,
impl<const PTR_STORAGE: usize, B> Unpin for DnsQuestions<PTR_STORAGE, B>where B: Unpin,
impl<const PTR_STORAGE: usize, B> UnwindSafe for DnsQuestions<PTR_STORAGE, B>where B: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more