Closed bluss closed 1 month ago
Hi bluss,
In order to get a type safe builder API, I had to implement many different structs and auxiliary functionality and I thought it would be more confusing than helpful to document and expose those. In generel, I agree that it would be ideal to document all public functions and structs. I'll see how it looks and what I can do.
Is it concretely the handle_events_with
signature you would like to see? Or...?
Kind regards, Nicholas
Yes, it was specifically handle_events_with I was looking into how to use and what it would accept. Also the question of if there was any polymorphism (I see now from examples that there is probably not) for events, where function signature of handle_events_with would determine which subset of events it would handle and so on.
Hi bluss,
I've made the builder
module pub now and added documentation. See version 3.1.0.
I'm a bit blinded by having worked so much on the code base - so does it make sense to you?
If you have any suggestions for improvements, I'm very happy to receive Pull Requests :-)
Kind regards, Nicholas
Nice, thanks for making it visible. Now the types involved are clickable in docs and it's possible to understand more parts of the API.
Any suggestions for improvements? Otherwise, I'll close this issue.
Kind regards Nicholas
No suggestions right now! 🙂
Cool, closing now.
The method
handle_events_with
is used in docs and there are some good examples, but we can't find the rustdoc for the method handle_events_with itself.I think this is probably because types like
SPBuilder
are not documented. I know there is no perfect solution here (concrete types vs traits and the interface you want to document and expose), but if this was my library I think I would treat SPBuilder as necessarily public and that it would be visible in docs (because it's a type participating in a public function's signature).Similar things might be going on with SingleProducerBarrier and many other types which are pub but not reachable in docs.