pub fn receive_to_fd(offer: &WlDataOffer, mime_type: String, writefd: OwnedFd)
Expand description
Receive data to the write end of a raw file descriptor. If you have the read end, you can read from it.
You can do this several times, as a reaction to motion of the dnd cursor, or to inspect the data in order to choose your response.
Note that you should not read the contents right away in a blocking way, as you may deadlock your application doing so. At least make sure you flush your events to the server before doing so.
The provided file destructor must be a valid FD for writing, and will be closed once the contents are written.