Struct IpHint
#[repr(transparent)]pub struct IpHint<T>(pub Vec<T>);
Expand description
RFC 9460 SVCB and HTTPS Resource Records, Nov 2023
7.3. "ipv4hint" and "ipv6hint"
The "ipv4hint" and "ipv6hint" keys convey IP addresses that clients
MAY use to reach the service. If A and AAAA records for TargetName
are locally available, the client SHOULD ignore these hints.
Otherwise, clients SHOULD perform A and/or AAAA queries for
TargetName per Section 3, and clients SHOULD use the IP address in
those responses for future connections. Clients MAY opt to terminate
any connections using the addresses in hints and instead switch to
the addresses in response to the TargetName query. Failure to use A
and/or AAAA response addresses could negatively impact load balancing
or other geo-aware features and thereby degrade client performance.
The presentation value SHALL be a comma-separated list (Appendix A.1)
of one or more IP addresses of the appropriate family in standard
textual format [RFC5952] [RFC4001]. To enable simpler parsing, this
SvcParamValue MUST NOT contain escape sequences.
The wire format for each parameter is a sequence of IP addresses in
network byte order (for the respective address family). Like an A or
AAAA RRset, the list of addresses represents an unordered collection,
and clients SHOULD pick addresses to use in a random order. An empty
list of addresses is invalid.
When selecting between IPv4 and IPv6 addresses to use, clients may
use an approach such as Happy Eyeballs [HappyEyeballsV2]. When only
"ipv4hint" is present, NAT64 clients may synthesize IPv6 addresses as
specified in [RFC7050] or ignore the "ipv4hint" key and wait for AAAA
resolution (Section 3). For best performance, server operators
SHOULD include an "ipv6hint" parameter whenever they include an
"ipv4hint" parameter.
These parameters are intended to minimize additional connection
latency when a recursive resolver is not compliant with the
requirements in Section 4 and SHOULD NOT be included if most clients
are using compliant recursive resolvers. When TargetName is the
service name or the owner name (which can be written as "."), server
operators SHOULD NOT include these hints, because they are unlikely
to convey any performance benefit.
Tuple Fields§
§0: Vec<T>
Trait Implementations§
§impl<'r, T> BinDecodable<'r> for IpHint<T>where
T: BinDecodable<'r>,
impl<'r, T> BinDecodable<'r> for IpHint<T>where
T: BinDecodable<'r>,
§fn read(decoder: &mut BinDecoder<'r>) -> Result<IpHint<T>, ProtoError>
fn read(decoder: &mut BinDecoder<'r>) -> Result<IpHint<T>, ProtoError>
The wire format for each parameter is a sequence of IP addresses in network byte order (for the respective address family). Like an A or AAAA RRSet, the list of addresses represents an unordered collection, and clients SHOULD pick addresses to use in a random order. An empty list of addresses is invalid.
§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
§impl<T> BinEncodable for IpHint<T>where
T: BinEncodable,
impl<T> BinEncodable for IpHint<T>where
T: BinEncodable,
§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
The wire format for each parameter is a sequence of IP addresses in network byte order (for the respective address family). Like an A or AAAA RRSet, the list of addresses represents an unordered collection, and clients SHOULD pick addresses to use in a random order. An empty list of addresses is invalid.
impl<T> Eq for IpHint<T>where
T: Eq,
impl<T> StructuralPartialEq for IpHint<T>
Auto Trait Implementations§
impl<T> Freeze for IpHint<T>
impl<T> RefUnwindSafe for IpHint<T>where
T: RefUnwindSafe,
impl<T> Send for IpHint<T>where
T: Send,
impl<T> Sync for IpHint<T>where
T: Sync,
impl<T> Unpin for IpHint<T>where
T: Unpin,
impl<T> UnwindSafe for IpHint<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Create a new
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.