Struct dnssector::question_iterator::QuestionIterator
source · pub struct QuestionIterator<'t> { /* private fields */ }
Implementations§
source§impl<'t> QuestionIterator<'t>
impl<'t> QuestionIterator<'t>
pub fn new(rr_iterator: RRIterator<'t>) -> Self
Trait Implementations§
source§impl<'t> DNSIterable for QuestionIterator<'t>
impl<'t> DNSIterable for QuestionIterator<'t>
source§fn offset(&self) -> Option<usize>
fn offset(&self) -> Option<usize>
Returns the offset of the current RR, or
None
if we haven’t started
iterating yet or if the current record has been deleted. Read moresource§fn offset_next(&self) -> usize
fn offset_next(&self) -> usize
Returns the offset right after the current RR.
source§fn set_offset(&mut self, offset: usize)
fn set_offset(&mut self, offset: usize)
Sets the offset of the current RR.
source§fn set_offset_next(&mut self, offset: usize)
fn set_offset_next(&mut self, offset: usize)
Sets the offset of the next RR.
source§fn invalidate(&mut self)
fn invalidate(&mut self)
Prevents access to the current record.
This is useful after a delete operation: from a user perspective, the
current iterator doesn’t point to a valid RR any more.
source§fn recompute_rr(&mut self)
fn recompute_rr(&mut self)
Updates the precomputed RR information
source§fn recompute_sections(&mut self)
fn recompute_sections(&mut self)
Updates the precomputed offsets of each section.
source§fn parsed_packet(&self) -> &ParsedPacket
fn parsed_packet(&self) -> &ParsedPacket
Accesses the parsed packet structure.
source§fn parsed_packet_mut(&mut self) -> &mut ParsedPacket
fn parsed_packet_mut(&mut self) -> &mut ParsedPacket
Accesses the parsed packet structure.
source§fn is_tombstone(&self) -> bool
fn is_tombstone(&self) -> bool
Returns
true
if the record has been invalidated by a previous call to
delete()
source§fn name_slice(&self) -> &[u8] ⓘ
fn name_slice(&self) -> &[u8] ⓘ
Accesses the raw packet data, starting from the name.
source§fn rdata_slice(&self) -> &[u8] ⓘ
fn rdata_slice(&self) -> &[u8] ⓘ
Access the raw packet data, starting from right after the name.
source§fn name_slice_mut(&mut self) -> &mut [u8] ⓘ
fn name_slice_mut(&mut self) -> &mut [u8] ⓘ
Accesses the mutable raw packet data, starting from the name.
source§fn rdata_slice_mut(&mut self) -> &mut [u8] ⓘ
fn rdata_slice_mut(&mut self) -> &mut [u8] ⓘ
Accesses the mutable raw packet data, starting from right after the
name.
source§impl<'t> Debug for QuestionIterator<'t>
impl<'t> Debug for QuestionIterator<'t>
source§impl<'t> TypedIterable for QuestionIterator<'t>
impl<'t> TypedIterable for QuestionIterator<'t>
source§fn name(&self) -> Vec<u8>where
Self: DNSIterable,
fn name(&self) -> Vec<u8>where Self: DNSIterable,
Returns the RR name (labels are dot-delimited), as a byte vector. The
name is not supposed to be valid UTF-8. It will be converted to
lower-case, though, using traditional DNS conversion rules
source§fn copy_raw_name(&self, name: &mut Vec<u8>) -> usizewhere
Self: DNSIterable,
fn copy_raw_name(&self, name: &mut Vec<u8>) -> usizewhere Self: DNSIterable,
Appends the uncompressed RR name (raw format, with labels prefixed by
their length) to the given vector. Returns the length of the
uncompressed name.
source§fn current_section(&self) -> Result<Section, Error>where
Self: DNSIterable,
fn current_section(&self) -> Result<Section, Error>where Self: DNSIterable,
Returns the section the current record belongs to.
source§fn resize_rr(&mut self, shift: isize) -> Result<(), Error>where
Self: DNSIterable,
fn resize_rr(&mut self, shift: isize) -> Result<(), Error>where Self: DNSIterable,
Resizes the current record, by growing or shrinking (with a negative
value) the current record size by
shift
bytes.source§fn set_raw_name(&mut self, name: &[u8]) -> Result<(), Error>where
Self: DNSIterable,
fn set_raw_name(&mut self, name: &[u8]) -> Result<(), Error>where Self: DNSIterable,
Changes the name (raw format, untrusted content).
source§fn rr_type(&self) -> u16where
Self: DNSIterable,
fn rr_type(&self) -> u16where Self: DNSIterable,
Returns the query type for the current RR.
source§fn rr_class(&self) -> u16where
Self: DNSIterable,
fn rr_class(&self) -> u16where Self: DNSIterable,
Returns the query class for the current RR.
Auto Trait Implementations§
impl<'t> RefUnwindSafe for QuestionIterator<'t>
impl<'t> Send for QuestionIterator<'t>
impl<'t> Sync for QuestionIterator<'t>
impl<'t> Unpin for QuestionIterator<'t>
impl<'t> !UnwindSafe for QuestionIterator<'t>
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.