neitomic / doh-server

An implementation of DNS server which supports DNS over HTTPS
1 stars 1 forks source link

[doc] go down this rabbit hole of box::pin, recursive async function and write up a doc explaining it #22

Open sonhmai opened 6 days ago

sonhmai commented 6 days ago
          I'm going down this 🐰 hole! this ruins my morning 😆

_Originally posted by @sonhmai in https://github.com/neitomic/doh-server/pull/15#discussion_r1659520046_

        let recursive_response = Box::pin(recursive_lookup(socket, &new_ns_name, QueryType::A)).await?;
sonhmai commented 6 days ago

refs

Box::pin

Box

Box usage makes sense since

pin