pub struct ServiceInfo { /* private fields */ }
Expand description

Complete info about a Service Instance.

We can construct one PTR, one SRV and one TXT record from this info, as well as A (IPv4 Address) records.

Implementations

Creates a new service info.

ty_domain is the service type and the domain label, for example “_my-service._udp.local.”.

my_name is the instance name, without the service type suffix. properties are optional key/value pairs for the service.

host_ipv4 can be one or more IPv4 addresses, in a type that implements AsIpv4Addrs trait.

The host TTL and other TTL are set to default values.

Returns a reference of the service fullname.

This is useful, for example, in unregister.

Returns a reference of the properties from TXT records.

Returns the service’s hostname.

Returns the service’s port.

Returns the service’s addresses

Returns the service’s TTL used for SRV and Address records.

Returns the service’s TTL used for PTR and TXT records.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.