Custom DST - least un-sane approach?
The Rust Programming Language Forum
Custom DST - least un-sane approach?
The next step I'm about to take in polishing redbook is to find a better way to handle one of the ffi calls which returns a DST[1]. The "correct" definition of the struct would be: pub(crate) struct DeviceDetails { cbSize: u32, DevicePath: [u16], } I currently have the workaround, that relies on assumed knowledge of the maximum likely path length: pub(crate) struct DeviceDetails { cbSize: u32 = const {size_of::<SP_DEVICE_INTERFACE_DETAIL_DATA_W>() as u32}, DevicePath: [u16; M...
0 comments
No comments yet.