pub struct Publication {
pub port: u16,
pub text: Vec<String>,
pub srv_priority: u16,
pub srv_weight: u16,
pub ptr_ttl: i64,
pub srv_ttl: i64,
pub txt_ttl: i64,
}
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 PublicationResponder
channel being closed.
Fields§
§port: u16
The port at which the service instance is addressable.
text: Vec<String>
Text strings describing the instance.
srv_priority: u16
The priority of the SRV resource record for this publication. See RFC6763 for details.
srv_weight: u16
The weight of the SRV resource record for this publication. See RFC6763 for details.
ptr_ttl: i64
Time-to-live for PTR resource records.
srv_ttl: i64
Time-to-live for SRV resource records.
txt_ttl: i64
Time-to-live for TXT resource records.
Trait Implementations§
Source§impl Clone for Publication
impl Clone for Publication
Source§fn clone(&self) -> Publication
fn clone(&self) -> Publication
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Publication
impl Debug for Publication
Source§impl<D: ResourceDialect> Decode<Publication, D> for Publication
impl<D: ResourceDialect> Decode<Publication, D> for Publication
Source§impl<D: ResourceDialect> Encode<Publication, D> for &Publication
impl<D: ResourceDialect> Encode<Publication, D> for &Publication
Source§impl<D: ResourceDialect, T0: Encode<u16, D>, T1: Encode<Vector<BoundedString<255>, 256>, D>, T2: Encode<u16, D>, T3: Encode<u16, D>, T4: Encode<i64, D>, T5: Encode<i64, D>, T6: Encode<i64, D>> Encode<Publication, D> for (T0, T1, T2, T3, T4, T5, T6)
impl<D: ResourceDialect, T0: Encode<u16, D>, T1: Encode<Vector<BoundedString<255>, 256>, D>, T2: Encode<u16, D>, T3: Encode<u16, D>, T4: Encode<i64, D>, T5: Encode<i64, D>, T6: Encode<i64, D>> Encode<Publication, D> for (T0, T1, T2, T3, T4, T5, T6)
Source§impl Hash for Publication
impl Hash for Publication
Source§impl Ord for Publication
impl Ord for Publication
Source§fn cmp(&self, other: &Publication) -> Ordering
fn cmp(&self, other: &Publication) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Publication
impl PartialEq for Publication
Source§impl PartialOrd for Publication
impl PartialOrd for Publication
Source§impl TypeMarker for Publication
impl TypeMarker for Publication
Source§type Owned = Publication
type Owned = Publication
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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.Source§impl ValueTypeMarker for Publication
impl ValueTypeMarker for Publication
Source§type Borrowed<'a> = &'a Publication
type Borrowed<'a> = &'a Publication
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Eq for Publication
impl Persistable for Publication
impl StructuralPartialEq for Publication
Auto Trait Implementations§
impl Freeze for Publication
impl RefUnwindSafe for Publication
impl Send for Publication
impl Sync for Publication
impl Unpin for Publication
impl UnwindSafe for Publication
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)