Closed JohannesSchilling closed 8 months ago
Its probably better to impl https://doc.rust-lang.org/std/os/fd/trait.AsFd.html ?
Also, would you mind looking into if we can do the same for the rust windows backend?
hm, on first look windows looks more difficult, because there we use https://docs.rs/windows-sys/latest/windows_sys/Win32/Foundation/type.HANDLE.html as basis, but the AsHandle
trait uses https://doc.rust-lang.org/std/os/windows/io/type.RawHandle.html, so we'd have to cast isize
to *mut c_void
(?)
I say lets ignore windows for now. I looked through some comments e.g. https://github.com/microsoft/windows-rs/issues/2222. If windows_sys devs decide to implement something, we can use that.
Seems like your changes do not compile, pls check.
Thx, will release a new version to crates.io soon.
This is useful to allow performing custom ioctls/operations on nonstandard HID devices.