pub struct Srv<'a> { /* private fields */ }Expand description
Parsed SRV record rdata: priority, weight, port, target.
Implementations§
Source§impl<'a> Srv<'a>
impl<'a> Srv<'a>
Sourcepub fn try_from_message(
message: &'a [u8],
rdata_offset: usize,
rdata_len: usize,
) -> Result<Srv<'a>, ParseError>
pub fn try_from_message( message: &'a [u8], rdata_offset: usize, rdata_len: usize, ) -> Result<Srv<'a>, ParseError>
Parse an SRV record’s rdata. message is the full message; rdata_offset
is the start of the rdata bytes within it; rdata_len is the declared
RDLENGTH.
the 6-byte fixed header (priority+weight+port) AND the inline
portion of the target name MUST fit within the declared rdata_len.
A record advertising a short rdlength must not be allowed to consume
bytes past its declared boundary.
Trait Implementations§
impl<'a> Copy for Srv<'a>
impl<'a> Eq for Srv<'a>
impl<'a> StructuralPartialEq for Srv<'a>
Auto Trait Implementations§
impl<'a> Freeze for Srv<'a>
impl<'a> RefUnwindSafe for Srv<'a>
impl<'a> Send for Srv<'a>
impl<'a> Sync for Srv<'a>
impl<'a> Unpin for Srv<'a>
impl<'a> UnsafeUnpin for Srv<'a>
impl<'a> UnwindSafe for Srv<'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