To allow extended usage of the operations, we need to allow them to
become boxed.
For that, we need to convert then from async fn to impl Future so we
can define it as 'static futures, which shows that we can't keep
references to self.
To fix this, we have to convert them to async move closure, and use
the Arc<RW> structures we already use to move them into the future.
This required us to change the API to accept a Vec<u8>, instead of
allocating internally to allow moving to a static future.
This also required changes on the internal Mdns struct, but those should
not be API changes.
To allow extended usage of the operations, we need to allow them to become boxed.
For that, we need to convert then from
async fn
toimpl Future
so we can define it as'static
futures, which shows that we can't keep references toself
.To fix this, we have to convert them to
async move
closure, and use theArc<RW>
structures we already use to move them into the future.This required us to change the API to accept a
Vec<u8>
, instead of allocating internally to allow moving to a static future.This also required changes on the internal Mdns struct, but those should not be API changes.