Struct ServiceInstancePublication
pub struct ServiceInstancePublication {
pub port: Option<u16>,
pub text: Option<Vec<Vec<u8>>>,
pub srv_priority: Option<u16>,
pub srv_weight: Option<u16>,
pub ptr_ttl: Option<i64>,
pub srv_ttl: Option<i64>,
pub txt_ttl: Option<i64>,
/* private fields */
}
Expand description
Describes an initial instance announcement or query response. In typical
use, the default SRV priority, SRV weight and TTL values should be used. TTL
values are rounded down to the nearest second. TTL values less than one
second are not permitted and will result in the ServiceInstancePublicationResponder
channel being closed.
Fields§
§port: Option<u16>
The port at which the service instance is addressable. This value is required.
text: Option<Vec<Vec<u8>>>
Text strings describing the instance. If this value is not supplied, no text strings are associated with the instance in this publication.
srv_priority: Option<u16>
The priority of the SRV resource record for this publication. See RFC6763 for details. If this value is not supplied, the default SRV priority of 0 is used.
srv_weight: Option<u16>
The weight of the SRV resource record for this publication. See RFC6763 for details. If this value is not supplied, the default SRV weight of 0 is used.
ptr_ttl: Option<i64>
Time-to-live for PTR resource records. If this value is not supplied, the default PTR TTL of 2 minutes is used. This value is rounded down to the nearest second.
srv_ttl: Option<i64>
Time-to-live for SRV resource records. If this value is not supplied, the default SRV TTL of 2 minutes is used. This value is rounded down to the nearest second.
txt_ttl: Option<i64>
Time-to-live for TXT resource records. If this value is not supplied, the default TXT TTL of 75 minutes is used. This value is rounded down to the nearest second.
Trait Implementations§
§impl Clone for ServiceInstancePublication
impl Clone for ServiceInstancePublication
§fn clone(&self) -> ServiceInstancePublication
fn clone(&self) -> ServiceInstancePublication
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ServiceInstancePublication
impl Debug for ServiceInstancePublication
§impl<D> Decode<ServiceInstancePublication, D> for ServiceInstancePublicationwhere
D: ResourceDialect,
impl<D> Decode<ServiceInstancePublication, D> for ServiceInstancePublicationwhere
D: ResourceDialect,
§fn new_empty() -> ServiceInstancePublication
fn new_empty() -> ServiceInstancePublication
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for ServiceInstancePublication
impl Default for ServiceInstancePublication
§fn default() -> ServiceInstancePublication
fn default() -> ServiceInstancePublication
§impl<D> Encode<ServiceInstancePublication, D> for &ServiceInstancePublicationwhere
D: ResourceDialect,
impl<D> Encode<ServiceInstancePublication, D> for &ServiceInstancePublicationwhere
D: ResourceDialect,
§impl PartialEq for ServiceInstancePublication
impl PartialEq for ServiceInstancePublication
§impl TypeMarker for ServiceInstancePublication
impl TypeMarker for ServiceInstancePublication
§type Owned = ServiceInstancePublication
type Owned = ServiceInstancePublication
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for ServiceInstancePublication
impl ValueTypeMarker for ServiceInstancePublication
§type Borrowed<'a> = &'a ServiceInstancePublication
type Borrowed<'a> = &'a ServiceInstancePublication
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<ServiceInstancePublication as TypeMarker>::Owned,
) -> <ServiceInstancePublication as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ServiceInstancePublication as TypeMarker>::Owned, ) -> <ServiceInstancePublication as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.