[][src]Struct libp2p_mdns::Mdns

pub struct Mdns<TSubstream> { /* fields omitted */ }

A NetworkBehaviour for mDNS. Automatically discovers peers on the local network and adds them to the topology.

Methods

impl<TSubstream> Mdns<TSubstream>[src]

pub fn new() -> Result<Mdns<TSubstream>>[src]

Builds a new Mdns behaviour.

pub fn has_node(&self, peer_id: &PeerId) -> bool[src]

Returns true if the given PeerId is in the list of nodes discovered through mDNS.

Trait Implementations

impl<TSubstream> Debug for Mdns<TSubstream>[src]

impl<TSubstream> NetworkBehaviour for Mdns<TSubstream> where
    TSubstream: AsyncRead + AsyncWrite
[src]

type ProtocolsHandler = DummyProtocolsHandler<TSubstream>

Handler for all the protocols the network behaviour supports.

type OutEvent = MdnsEvent

Event generated by the NetworkBehaviour and that the swarm will report back.

Auto Trait Implementations

impl<TSubstream> Send for Mdns<TSubstream> where
    TSubstream: Send

impl<TSubstream> Sync for Mdns<TSubstream> where
    TSubstream: Sync

impl<TSubstream> Unpin for Mdns<TSubstream> where
    TSubstream: Unpin

impl<TSubstream> !UnwindSafe for Mdns<TSubstream>

impl<TSubstream> !RefUnwindSafe for Mdns<TSubstream>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,