pub struct MulticastConfig {
pub group: IpAddr,
pub port: u16,
pub interfaces: Vec<IpAddr>,
pub hop_limit: u32,
pub reuse_address: bool,
}Expand description
What a multicast socket is bound and joined to.
Fields§
§group: IpAddrThe group (224.0.0.251 or ff02::fb for mDNS).
port: u16The port (5353 for mDNS).
interfaces: Vec<IpAddr>The addresses of the interfaces to join the group on: one membership per interface
that has one of them (the addresses of the group’s family; an IPv6 address names its
interface by index, interface_index). Empty: the system’s default interface only.
RFC 6762 section 14: a host on several links takes part in mDNS on each of them.
hop_limit: u32TTL / hop limit of what it sends, multicast and unicast (255 for mDNS, RFC 6762 section 11).
reuse_address: boolShares the port with other processes (SO_REUSEADDR, and SO_REUSEPORT where the
platform has it).
Implementations§
Source§impl MulticastConfig
impl MulticastConfig
Sourcepub fn mdns(group: IpAddr, interfaces: Vec<IpAddr>) -> Self
pub fn mdns(group: IpAddr, interfaces: Vec<IpAddr>) -> Self
mDNS on group (224.0.0.251 or ff02::fb): port 5353, joined on the interfaces of
interfaces (the default interface when empty), hop limit 255, the port shared with
the host’s other responders.
Sourcepub fn interfaces_of_family(&self) -> impl Iterator<Item = IpAddr> + '_
pub fn interfaces_of_family(&self) -> impl Iterator<Item = IpAddr> + '_
The addresses of interfaces of the group’s family.
Trait Implementations§
Source§impl Clone for MulticastConfig
impl Clone for MulticastConfig
Source§impl Debug for MulticastConfig
impl Debug for MulticastConfig
impl Eq for MulticastConfig
Source§impl PartialEq for MulticastConfig
impl PartialEq for MulticastConfig
impl StructuralPartialEq for MulticastConfig
Auto Trait Implementations§
impl Forget for MulticastConfig
impl Freeze for MulticastConfig
impl Move for MulticastConfig
impl RefUnwindSafe for MulticastConfig
impl Send for MulticastConfigwhere
RawVecInner: Send,
impl Sync for MulticastConfigwhere
RawVecInner: Sync,
impl Unpin for MulticastConfig
impl UnsafeUnpin for MulticastConfig
impl UnwindSafe for MulticastConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.