doc-push
doc-push copied to clipboard
API guidelines for asynchronous libraries
The Rust API guidelines are a initiative for making Rust libraries feel more similar. Something similar should exist for asynchronous libraries. Should my methods take &self
or self
? Should I return (Self, X)
or (X, Self)
? How do I return Self
on error if I take &self
?
I don’t know if we want to be as strict as the rust api guidelines or is we would have as much content . Maybe this would work as a page in the cookbooks section?
I don't think it needs to be quite as strict, but some guidelines/best practices I think would help a lot. Might also encourage some more interface uniformity in the ecosystem.