capnproto-rust icon indicating copy to clipboard operation
capnproto-rust copied to clipboard

remove 'IntoListReader' trait

Open danieleades opened this issue 3 years ago • 2 comments

danieleades avatar Nov 21 '22 20:11 danieleades

This trait appears in user-facing API here: https://github.com/capnproto/capnproto-rust/blob/636e4d50af63efd2f61dc8e08c7573c71420af75/capnp/src/raw.rs#L50

After this change, the private ListReader type would appear there instead, which I would prefer not to expose in such an API. I don't want users clicking on documentation links trying to understand this function, and ending up in the capnp::private namespace, where they usually don't need to be.

I've added a bit of documentation here: https://github.com/capnproto/capnproto-rust/commit/636e4d50af63efd2f61dc8e08c7573c71420af75

dwrensha avatar Jan 16 '23 20:01 dwrensha

This trait appears in user-facing API here:

https://github.com/capnproto/capnproto-rust/blob/636e4d50af63efd2f61dc8e08c7573c71420af75/capnp/src/raw.rs#L50

After this change, the private ListReader type would appear there instead, which I would prefer not to expose in such an API. I don't want users clicking on documentation links trying to understand this function, and ending up in the capnp::private namespace, where they usually don't need to be.

I've added a bit of documentation here: 636e4d5

Can you not hide the type using #[doc(hidden)]?

danieleades avatar Jan 16 '23 21:01 danieleades