pub struct Ptr<'a> { /* private fields */ }Expand description
Parsed PTR record rdata.
Implementations§
Source§impl<'a> Ptr<'a>
impl<'a> Ptr<'a>
Sourcepub fn try_from_message(
message: &'a [u8],
rdata_offset: usize,
rdata_len: usize,
) -> Result<Ptr<'a>, ParseError>
pub fn try_from_message( message: &'a [u8], rdata_offset: usize, rdata_len: usize, ) -> Result<Ptr<'a>, ParseError>
Parses a PTR record’s rdata. message is the full DNS message so
compression pointers can resolve; rdata_offset is the start of the
rdata bytes within it; rdata_len is the declared RDLENGTH.
the inline portion of the encoded name (label bytes plus any
initial compression pointer) MUST fit within the declared rdata_len.
Without this check a record advertising a short rdlength could let
inline labels run past the declared boundary and consume bytes from
the next record, corrupting downstream conflict-routing,
known-answer suppression, and cache decisions.
Trait Implementations§
impl<'a> Copy for Ptr<'a>
impl<'a> Eq for Ptr<'a>
impl<'a> StructuralPartialEq for Ptr<'a>
Auto Trait Implementations§
impl<'a> Freeze for Ptr<'a>
impl<'a> RefUnwindSafe for Ptr<'a>
impl<'a> Send for Ptr<'a>
impl<'a> Sync for Ptr<'a>
impl<'a> Unpin for Ptr<'a>
impl<'a> UnsafeUnpin for Ptr<'a>
impl<'a> UnwindSafe for Ptr<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more