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<Self, ParseError>
pub fn try_from_message( message: &'a [u8], rdata_offset: usize, rdata_len: usize, ) -> Result<Self, 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