Derive Copy/Clone from simple type

I am using the bindgen package and it is declaring a type like this in the crate foo:

pub type tag_t = ::std::os::raw::c_uint;

In another crate, wrapfoo, I am wanting to have a reference to foo::tag_t because I do not want any of the rest of my code to directly reference the unsafe methods in foo. I have my own definition like:

pub type Tag = tcapigen::tag_t;

However, at this point, it looks like Tag itself does not implement Copy/Clone and I cannot derive those implementations even though the underlying type is ::std::os::raw::c_unit.
Any recommendations?

Your Tag type is just an alternate name for the u32 type, so it does implement Copy/Clone.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.