1pub mod client;
2pub mod cookie;
3pub mod cors;
4pub mod server;
5
6pub struct Cookie<'cookie, KeyState, ValueState> {
7 key: &'cookie str,
8 value: &'cookie str,
9 http_only: Option<bool>,
10 same_site: Option<SameSite>,
11 secure: Option<bool>,
12 path: Option<&'cookie str>,
13 max_age: Option<u64>,
14 properties: Option<Properties>,
15 keystate: std::marker::PhantomData<KeyState>,
16 valuestate: std::marker::PhantomData<ValueState>,
17}
18
19pub enum SameSite {
20 Strict,
21 Lax,
22 None,
23}
24
25pub enum Properties {
26 Low,
27 Medium,
28 High,
29}
30
31pub struct KeyPresent;
32pub struct KeyNotPresent;
33
34pub struct ValuePresent;
35pub struct ValueNotPresent;
36
37pub struct ClientResponse<
38 'response,
39 MethodState,
40 PathState,
41 StautState,
42 AuthorizationState,
43 ContentTypeState,
44 ContentState,
45> {
46 method: Vec<&'response str>,
47 path: Vec<&'response str>,
48 host: Vec<&'response str>,
49 authorization: Vec<Option<&'response str>>,
50 content_type: Vec<&'response str>,
51 content: Vec<&'response str>,
52 methodstate: std::marker::PhantomData<MethodState>,
53 pathstate: std::marker::PhantomData<PathState>,
54 hoststate: std::marker::PhantomData<StautState>,
55 authorizationstate: std::marker::PhantomData<AuthorizationState>,
56 contenttypestate: std::marker::PhantomData<ContentTypeState>,
57 contentstate: std::marker::PhantomData<ContentState>,
58}
59
60pub enum ContentType {
61 TextPlain,
62 TextHtml,
63 TextCss,
64 TextJavaScript,
65 TextXml,
66 ApplicationJson,
67 ApplicationXml,
68 ApplicationXWwwFormUrlencoded,
69 ApplicationOctetStream,
70 ApplicationPdf,
71 ApplicationZip,
72 ApplicationJavaScript,
73 MultipartFormData,
74 MultipartAlternative,
75 MultipartRelated,
76 ImageJpeg,
77 ImagePng,
78 ImageGif,
79 ImageSvgXml,
80 AudioMpeg,
81 AudioOgg,
82 VideoMp4,
83 VideoOgg,
84 FontWoff,
85 FontWoff2,
86 ApplicationFontWoff,
87 ApplicationMsExcel,
88 ApplicationMsWord,
89 ApplicationRtf,
90}
91
92pub struct MethodPresent;
93pub struct MethodNotPresent;
94
95pub struct PathPresent;
96pub struct PathNotPresent;
97
98pub struct HostPresent;
99pub struct HostNotPresent;
100
101pub struct AuthorizationPresent;
102pub struct AuthorizationNotPresent;
103
104pub struct ContentTypePresent;
105pub struct ContentTypeNotPresent;
106
107pub struct ContentPresent;
108pub struct ContentNotPresent;