Importing/Exporting an impl (not type) from another module #2393
Labels
A-linkage
Area: linking into static, shared libraries and binaries
A-type-system
Area: Type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Perhaps I'm trying to be too fancy. I'm writing an app that uses a generic type from a library called
request<T>
seen here. It comes with an iface/impl namedrequest
that adds a couple functions to the request. My app only needs one instance of this type, so I created a module like this:This doesn't quite the interface I'd like though. The users of this library have to do
import request::{request, mre_request}
in order to get the type and impl in scope. I'd much rather my other parts of the app just doimport request::request
to get the type/impl. Is there any way to simplify this down? Maybe we could allow importing/exporting just the impl from a module? Or maybe we could allow exporting just a single instantiated type, as in:The text was updated successfully, but these errors were encountered: