pub struct FoundSrvs { /* private fields */ }
Expand description
This is the return type for lookup_srv
.
Implementations§
source§impl FoundSrvs
impl FoundSrvs
sourcepub fn into_stream<R: Resolver>(
self,
resolver: &R
) -> impl Stream<Item = Result<ResolvedSrvItem, Error>> + '_where
R::Octets: Octets,
pub fn into_stream<R: Resolver>( self, resolver: &R ) -> impl Stream<Item = Result<ResolvedSrvItem, Error>> + '_where R::Octets: Octets,
Converts the found SRV records into socket addresses.
The method takes a reference to a resolver and returns a stream of socket addresses in the order prescribed by the SRV records. Each returned item provides the set of addresses for one host.
Note that if you are using the
StubResolver
, you will have to
pass in a double reference since Resolver
is implemented for a
reference to it and this method requires a reference to that impl
being passed. This quirk will be fixed in future versions.
sourcepub fn into_srvs(self) -> impl Iterator<Item = Srv<Dname<SmallOctets>>>
pub fn into_srvs(self) -> impl Iterator<Item = Srv<Dname<SmallOctets>>>
Converts the value into an iterator over the found SRV records.
If results were found, this returns them in the order prescribed by the SRV records.
If not results were found, the iterator will yield a single entry with the bare host and the default fallback port.