pub struct Responder { /* private fields */ }

Implementations

Spawn a Responder task on an new os thread.

Spawn a Responder task on an new os thread. DNS response records will have the reported IPs limited to those passed in here. This can be particularly useful on machines with lots of networks created by tools such as docker.

Spawn a Responder with the provided tokio Handle.

Example
use libmdns::Responder;

let rt = tokio::runtime::Builder::new_current_thread().build().unwrap();
let handle = rt.handle().clone();
let responder = Responder::spawn(&handle)?;

Spawn a Responder task with the provided tokio Handle. DNS response records will have the reported IPs limited to those passed in here. This can be particularly useful on machines with lots of networks created by tools such as docker.

Spawn a Responder on the default tokio handle.

Spawn a Responder on the default tokio handle. DNS response records will have the reported IPs limited to those passed in here. This can be particularly useful on machines with lots of networks created by tools such as docker.

Register a service to be advertised by the Responder. The service is unregistered on drop.

example
use libmdns::Responder;

let responder = Responder::new()?;
// bind service
let _http_svc = responder.register(
         "_http._tcp".into(),
         "my http server".into(),
         80,
         &["path=/"]
     );

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.