For the following example, it seems only the docs for MySubmoduleClass are generated. Would it be possible to autogenerate also the docs for each method? I think it would be very nice, if doable, to be able to call ?MySubmoduleClass$new or ?MySubmoduleClass$set_a on the R side.
// Class for testing
#[derive(Default, Debug)]
struct MySubmoduleClass {
a: i32,
}
/// Class for testing (exported)
/// @examples
/// x <- MySubmoduleClass$new()
/// x$a()
/// x$set_a(10)
/// x$a()
/// @export
#[extendr]
impl MySubmoduleClass {
/// Method for making a new object.
fn new() -> Self {
Self { a: 0 }
}
/// Method for setting stuff.
/// @param x a number
fn set_a(& mut self, x: i32) {
self.a = x;
}
/// Method for getting stuff.
fn a(&self) -> i32 {
self.a
}
/// Method for getting one's self.
fn me(&self) -> &Self {
self
}
}
For the following example, it seems only the docs for
MySubmoduleClass
are generated. Would it be possible to autogenerate also the docs for each method? I think it would be very nice, if doable, to be able to call?MySubmoduleClass$new
or?MySubmoduleClass$set_a
on the R side.