1use crate::TextHandlerImpl;
4use alux_http::HttpInputAlg;
5use core::marker::PhantomData;
6
7pub struct TextInputRole<Role, Input>(PhantomData<fn(Role) -> Input>);
9
10pub struct PathRole;
12pub struct QueryRole;
14pub struct BodyRole;
16pub struct FormRole;
18pub struct MultipartRole;
20pub struct RawBodyRole;
22pub struct HeaderRole;
24pub struct CookieRole;
26pub struct AuthRole;
28pub struct ContextRole;
30
31impl HttpInputAlg for TextHandlerImpl {
32 type Path<Input> = TextInputRole<PathRole, Input>;
33 type Query<Input> = TextInputRole<QueryRole, Input>;
34 type Body<Input> = TextInputRole<BodyRole, Input>;
35 type Form<Input> = TextInputRole<FormRole, Input>;
36 type Multipart<Input> = TextInputRole<MultipartRole, Input>;
37 type RawBody<Input> = TextInputRole<RawBodyRole, Input>;
38 type Header<Input> = TextInputRole<HeaderRole, Input>;
39 type Cookie<Input> = TextInputRole<CookieRole, Input>;
40 type Auth<Input> = TextInputRole<AuthRole, Input>;
41 type Context<Input> = TextInputRole<ContextRole, Input>;
42}