-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Basically, I haven't found a simple way to exclude exported elements of a module, in some cases (maybe edge cases) I want to export everything in a prelude EXCEPT! for a specific struct or trait, that forces me to export manually everything:
pub use axum::extract::{
ConnectInfo,
DefaultBodyLimit,
Extension,
Form,
FromRef,
FromRequest,
FromRequestParts,
// Json, I want to exclude this structure, so manually I export everything and I comment this line ✨
MatchedPath,
NestedPath,
OptionalFromRequest,
OptionalFromRequestParts,
OriginalUri,
Path,
Query,
RawForm,
RawPathParams,
RawQuery,
Request,
State,
};
And maybe we can provide a slightly more ergonomic way to do the same, something like this:
pub use axum::extract::*;
priv use axum::extract::Json;
That must export everything in axum::extract
excluding axum::extract::Json
and we are providing a functionality to the reserved keyword priv
It's just an idea, but I want to hear some comments about this.
Metadata
Metadata
Assignees
Labels
No labels