mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
807 stars 44 forks source link

Adding docs to cpp_class! generated classes #105

Closed luke-titley closed 1 year ago

luke-titley commented 1 year ago

Is there any way to document a class generated with cpp_class! ?

/// Cant put docs here
cpp_class!(pub unsafe struct MyClass as "MyClass");

Is there a work around for getting this sort of thing to work ?

ogoffart commented 1 year ago

Have you tried

cpp_class!(
    /// docs here
    pub unsafe struct MyClass as "MyClass"
);
luke-titley commented 1 year ago

No I didn't think of that. Thank you.