Skip to main content

Mdns

Trait Mdns 

Source
pub trait Mdns {
    // Required method
    async fn run<C, U>(
        &mut self,
        matter: &Matter<'_>,
        crypto: C,
        udp: U,
        mac: &[u8],
        ipv4: Ipv4Addr,
        ipv6: Ipv6Addr,
        interface: u32,
    ) -> Result<(), Error>
       where C: Crypto,
             U: UdpBind;
}
Expand description

A trait for running an mDNS responder.

Required Methods§

Source

async fn run<C, U>( &mut self, matter: &Matter<'_>, crypto: C, udp: U, mac: &[u8], ipv4: Ipv4Addr, ipv6: Ipv6Addr, interface: u32, ) -> Result<(), Error>
where C: Crypto, U: UdpBind,

Run the mDNS responder with the given UDP binding, MAC address, IPv4 and IPv6 addresses, and interface index.

NOTE: This trait might change once rs-matter starts supporting mDNS resolvers

§Arguments
  • matter: A reference to the Matter instance.
  • crypto: An object implementing the Crypto trait for cryptographic operations.
  • udp: An object implementing the UdpBind trait for binding UDP sockets.
  • mac: The MAC address of the host, used to generate the hostname.
  • ipv4: The IPv4 address of the host.
  • ipv6: The IPv6 address of the host.
  • interface: The interface index for the host, used for IPv6 multicast.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Mdns for &mut T
where T: Mdns,

Source§

fn run<C, U>( &mut self, matter: &Matter<'_>, crypto: C, udp: U, mac: &[u8], ipv4: Ipv4Addr, ipv6: Ipv6Addr, interface: u32, ) -> impl Future<Output = Result<(), Error>>
where C: Crypto, U: UdpBind,

Implementors§