Inheritance
When implementing trait methods, documentation of the method in the implementing struct is often redundent. For these cases, Modo🧯 offers doc inheritance.
In the method docstring, reference the parent trait in double square brackets, somewhere in the summary (i.e. in the first sentence). The syntax is the same as for cross-references. See line 14 below:
|
|
This copies the entire documentation from the trait’s method with the same signature into the struct’s method. This includes docs for arguments, parameters, return and raises. Any original docs of the struct’s method are replaced completely.
Inheriting documentation is only possible from traits in the same root package.