You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with the bindgen ParseCallbacks::add_derives interface, I can add defmt::Format to all of the bindings without issue, however I currently need to manually make exceptions for any type that includes C function pointers and any struct including those structs.
The std Debug impl is just printing the function pointer. Don't see any reason why defmt shouldn't do exactly the same
On a strongly related topic, core::ptr::NonNull is a fairly common need when wrapping a generated C-API (at least, from what I've written wrappers for) and doesn't currently have defmt support
The text was updated successfully, but these errors were encountered:
Crzyrndm
changed the title
derive support for C-like fn pointers
derive support for C-like fn pointers and core::ptr::NonNullMay 5, 2023
When generating a Rust binding to a C struct containing function pointers,
bindgen
outputs type definitions that look roughly like the followingwith the bindgen
ParseCallbacks::add_derives
interface, I can adddefmt::Format
to all of the bindings without issue, however I currently need to manually make exceptions for any type that includes C function pointers and any struct including those structs.The std Debug impl is just printing the function pointer. Don't see any reason why defmt shouldn't do exactly the same
On a strongly related topic,
core::ptr::NonNull
is a fairly common need when wrapping a generated C-API (at least, from what I've written wrappers for) and doesn't currently have defmt supportThe text was updated successfully, but these errors were encountered: