Generating Rust Gir docs for a manual trait

I am trying to get the docs for a manual trait listed within its struct page. The main struct page is missing the method string. The docs for this method is listed on the ExtManual page. How can I get Gir and cargo doc to place the string method on the main struct page?

Here’s my gir file and my sparql_curser extManual file.

The function is marked as manual but you’re renaming it to something else. You need to use rename = "string"

Also the doc aliases should be added to the trait, not to the trait implementation. Another thing SparqlCursor is a final type, you don’t need to add a ExtManual trait. You can just

impl SparqlCursor {
   pub fn string() -> .....

I’ve added rename to the Gir file, but I don’t understand what you mean about the final type?

SparqlCursor is defined in src/auto/ and when I try to change src/ to implement SparqlCursor like you have said, Rust is saying it’s private, already defined and wants to import it directly (E0603)

Some background: The method tracker_sparql_cursor_get_string returns a string and the length of the string. In Rust the length is not needed so I am re-implementing the method to only return the string. The Tracker API already has a technique to drop the length variable by passing null.

Also, when I move the doc alias from the implementation to the trait, it is not shown up in the docs. As seen in my prelude docs page and my latest commit.

Thanks for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.