logoalt Hacker News

the8472today at 11:07 AM1 replyview on HN

From/Into conversion via OwnedFd is the safe API, RawFd is the older and lower-level one.


Replies

erk__today at 11:29 AM

Ahh I guess that means that its possible in safe rust to cast a file descriptor to a different type. I was just looking at how socket2 did it and forgot to have a proper look.