Struct Nsid Copy item path Source pub struct Nsid<Octs: ?Sized > { }
Expand description Option data for the Name Server Identifier (NSID) Option.
This option allows identifying a particular name server that has answered
a query. If a client is interested in this information, it includes an
empty NSID option in its query. If the server supports the option, it
includes it in its response with byte string identifying the server.
The option and details about its use are defined in
RFC 5001 .
Creates a value from the ocets of the name server identifier.
The function returns an error if octets
is longer than 65,535
octets.
Creates a value from the name server identifier without checking.
§ Safety
The caller has to make sure that octets
is no longer than 65,535
octets.
Parses a value from its wire format.
Creates a value for a slice of the name server identifer.
The function returns an error if slice
is longer than 65,535
octets.
Creates a value for a slice without checking.
§ Safety
The caller has to make sure that octets
is no longer than 65,535
octets.
Creates an empty NSID option value.
Returns a reference to the octets with the server identifier.
Converts the value into the octets with the server identifier.
Returns a slice of the server identifier.
Returns a value over an octets slice.
Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value.
Read more Performs copy-assignment from
source
.
Read more Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Converts to this type from the input type.
Performs the conversion.
Performs an infallible conversion.
Returns the option code associated with this option.
Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dest
.
Read more Checks if this value is equivalent to the given key.
Read more Returns the argument unchanged.
Instruments this type with the provided
Span
, returning an
Instrumented
wrapper.
Read more Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From <T> for U
chooses to do.
Performs the conversion.
Performs an infallible conversion.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String
.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.