-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation generation for custom types #847
Conversation
Still too many I am wondering if there is a way to do this without introducing a parallel set of API's... How about if we include "the last function hash" inside builder
.with_get("foo", ...) // stores hash in builder type
.add_comments(...) // always uses hash in builder (if Some) to look up function in engine
.... The global namespace can be accessed via If you don't mind updating the parameter and return type names also, you can just use |
@schungx I think this is a good idea ... for functions. I guess that for types we still need a |
Since each builder has only one type, it is quite trivial to add a Implementation wise, it can lookup the registered type via This way no public API needs to change. Only a few more methods to the builder API. |
…ect the function registration api
I have done the changes, however when I execute the |
also rustc 1.77 seems to break the |
Find out why: using the |
Looking good! A couple of observations:
Maybe... #[cfg(feature = "metadata")]
self = if self.metadata.params_info.is_none() {
...
self.with_params_info(...)
} else {
self
};
self...... |
I agree with your comments, I made the changes. |
I think it looks good. Let's merge this. |
I wonder if it is possible to avoid adding Since the builder API is in the same crate, I think I can just inline the code in. EDIT: I ended up replacing |
Add documentation for types that derive the
CustomType
macro with themetadata
feature.