pub struct DiscoveredService {
pub name: String,
pub service_type: String,
pub domain: String,
pub host_name: String,
pub port: u16,
pub addresses: Vec<IpAddr>,
pub txt_records: Vec<TxtRecord>,
pub interface_index: Option<NonZeroU32>,
}Expand description
A resolved, connectable service instance.
Fields§
§name: StringThe service instance name, e.g. My Web Server.
service_type: StringThe service type, e.g. _http._tcp.
domain: StringThe domain the service was discovered in, e.g. local.
host_name: StringThe SRV target host name, e.g. macbook.local.
port: u16The port the service accepts connections on.
addresses: Vec<IpAddr>Resolved IP addresses for host_name. May be empty
if address resolution did not (yet) yield any records.
txt_records: Vec<TxtRecord>The service’s TXT record entries.
interface_index: Option<NonZeroU32>The interface the service was discovered on, if known.
Implementations§
Source§impl DiscoveredService
impl DiscoveredService
Sourcepub fn socket_addrs(&self) -> impl Iterator<Item = SocketAddr> + '_
pub fn socket_addrs(&self) -> impl Iterator<Item = SocketAddr> + '_
Trait Implementations§
Source§impl Clone for DiscoveredService
impl Clone for DiscoveredService
Source§fn clone(&self) -> DiscoveredService
fn clone(&self) -> DiscoveredService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiscoveredService
impl RefUnwindSafe for DiscoveredService
impl Send for DiscoveredService
impl Sync for DiscoveredService
impl Unpin for DiscoveredService
impl UnsafeUnpin for DiscoveredService
impl UnwindSafe for DiscoveredService
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