Skip to main content

Mdns

Struct Mdns 

Source
pub struct Mdns<'a, M: Udp> {
    pub socket: &'a M,
    pub group: PeerAddr,
    pub interface: u32,
}
Available on crate feature rustcrypto only.
Expand description

The mDNS side of Runtime::run: the socket bound to 5353, the group answers go to, and the interface both live on.

The interface index matters twice: it is the link the multicast group is joined on, and the zone every answer is sent with. ff02::fb is link-local, so a send with no interface is ambiguous and the operating system refuses it.

Fields§

§socket: &'a M

The mDNS socket.

§group: PeerAddr

ff02::fb on the interface — StdUdp::mdns_group on std.

§interface: u32

The interface index, also used to join groupcast addresses.

Trait Implementations§

Source§

impl<'a, M: Debug + Udp> Debug for Mdns<'a, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, M> Forget for Mdns<'a, M>

§

impl<'a, M> Freeze for Mdns<'a, M>
where &'a M: Freeze,

§

impl<'a, M> Move for Mdns<'a, M>

§

impl<'a, M> RefUnwindSafe for Mdns<'a, M>

§

impl<'a, M> Send for Mdns<'a, M>
where &'a M: Send,

§

impl<'a, M> Sync for Mdns<'a, M>
where &'a M: Sync,

§

impl<'a, M> Unpin for Mdns<'a, M>
where &'a M: Unpin,

§

impl<'a, M> UnsafeUnpin for Mdns<'a, M>

§

impl<'a, M> UnwindSafe for Mdns<'a, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.