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>> + '_
pub fn into_stream<R: Resolver>( self, resolver: &R, ) -> impl Stream<Item = Result<ResolvedSrvItem, Error>> + '_
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<Name<SmallOctets>>>
pub fn into_srvs(self) -> impl Iterator<Item = Srv<Name<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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FoundSrvs
impl RefUnwindSafe for FoundSrvs
impl Send for FoundSrvs
impl Sync for FoundSrvs
impl Unpin for FoundSrvs
impl UnwindSafe for FoundSrvs
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)