I'm a bit lost with a struct I have :
pub struct Blah {
pub efd: mio::unix::EventedFd,
}
When compiling that I get expected lifetime parameter
for the EventedFd
even though it isn't a reference. I tried wrapping it in a Box but the error stays the same.
I could add a lifetime parameter but I feel like I'm missing something important, I don't get why I'd need it right there. I actually have another Box in that same struct which works perfectly fine without a lifetime parameter, so I assume it has something to do with the type of EventedFd
.
I just want to store that EventedFd in there, like this (I tried with and without the Box, as mentioned) :
let efd = Box::new(EventedFd(&fd.as_raw_fd()));
Blah {efd}