pub struct QuestionIterator<'t> { /* private fields */ }

Implementations§

source§

impl<'t> QuestionIterator<'t>

source

pub fn new(rr_iterator: RRIterator<'t>) -> Self

Trait Implementations§

source§

impl<'t> DNSIterable for QuestionIterator<'t>

source§

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 more
source§

fn offset_next(&self) -> usize

Returns the offset right after the current RR.
source§

fn set_offset(&mut self, offset: usize)

Sets the offset of the current RR.
source§

fn set_offset_next(&mut self, offset: usize)

Sets the offset of the next RR.
source§

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)

Updates the precomputed RR information
source§

fn recompute_sections(&mut self)

Updates the precomputed offsets of each section.
source§

fn raw(&self) -> RRRaw<'_>

Accesses the raw packet data.
source§

fn raw_mut(&mut self) -> RRRawMut<'_>

Accesses the mutable raw packet data.
source§

fn parsed_packet(&self) -> &ParsedPacket

Accesses the parsed packet structure.
source§

fn parsed_packet_mut(&mut self) -> &mut ParsedPacket

Accesses the parsed packet structure.
source§

fn next(self) -> Option<Self>

Returns the next record, or None if there aren’t any left.
source§

fn is_tombstone(&self) -> bool

Returns true if the record has been invalidated by a previous call to delete()
source§

fn packet(&self) -> &[u8]

Raw packet data.
source§

fn name_slice(&self) -> &[u8]

Accesses the raw packet data, starting from the name.
source§

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]

Accesses the mutable raw packet data, starting from the name.
source§

fn rdata_slice_mut(&mut self) -> &mut [u8]

Accesses the mutable raw packet data, starting from right after the name.
source§

fn uncompress(&mut self) -> Result<(), Error>

Decompresses the whole packet while keeping the iterator available.
source§

impl<'t> Debug for QuestionIterator<'t>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'t> TypedIterable for QuestionIterator<'t>

source§

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,

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,

Returns the section the current record belongs to.
source§

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,

Changes the name (raw format, untrusted content).
source§

fn delete(&mut self) -> Result<(), Error>where Self: DNSIterable,

Deletes the record
source§

fn rr_type(&self) -> u16where Self: DNSIterable,

Returns the query type for the current RR.
source§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,

§

type Err = NoError

The error type produced by a failed conversion.
§

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,

§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, Dst> ConvAsUtil<Dst> for T

§

fn approx(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,

Approximate the subject with the default scheme.
§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
§

impl<T> ConvUtil for T

§

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,

Approximate the subject to a given type with a specific scheme.
§

fn into_as<Dst>(self) -> Dstwhere Self: Sized + Into<Dst>,

Convert the subject to a given type.
§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<Src> TryFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<Src, Dst> TryInto<Dst> for Srcwhere Dst: TryFrom<Src>,

§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<Src> ValueFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
§

impl<Src, Dst> ValueInto<Dst> for Srcwhere Dst: ValueFrom<Src>,

§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.