Skip to main content

http_type/body/
type.rs

1use super::*;
2
3/// An alias for `String`, representing the boundary declared by a `multipart/form-data` content type.
4pub type MultipartFormDataBoundary = String;
5
6/// An alias for `Vec<BodyPart>`, representing every part of a parsed `multipart/form-data` body.
7pub type MultipartFormDataParts = Vec<BodyPart>;
8
9/// An alias for `Vec<&[u8]>`, representing the raw segments carried between two boundary lines.
10pub type MultipartFormDataSegments<'a> = Vec<&'a [u8]>;
11
12/// An alias for `String`, representing the form field name declared by a body part.
13pub type BodyPartName = String;
14
15/// An alias for `String`, representing the file name declared by an uploaded body part.
16pub type BodyPartFileName = String;
17
18/// An alias for `String`, representing the media type declared by a body part.
19pub type BodyPartContentType = String;
20
21/// An alias for `String`, representing the key of a body part header.
22pub type BodyPartHeaderKey = String;
23
24/// An alias for `String`, representing the value of a body part header.
25pub type BodyPartHeaderValue = String;
26
27/// An alias for `HashMapXxHash3_64<BodyPartHeaderKey, BodyPartHeaderValue>`, representing the headers a single part carries.
28pub type BodyPartHeaders = HashMapXxHash3_64<BodyPartHeaderKey, BodyPartHeaderValue>;
29
30/// An alias for `Vec<u8>`, representing the raw content of a body part.
31pub type BodyPartData = Vec<u8>;
32
33/// An alias for `HashMapXxHash3_64<BodyFormKey, BodyFormValue>`, representing a decoded `application/x-www-form-urlencoded` body.
34pub type BodyForm = HashMapXxHash3_64<BodyFormKey, BodyFormValue>;
35
36/// An alias for `String`, representing the key of a form field.
37pub type BodyFormKey = String;
38
39/// An alias for `String`, representing the value of a form field.
40pub type BodyFormValue = String;
41
42/// An alias for `String`, representing the request media type without its parameters.
43pub type RequestContentType = String;
44
45/// An alias for `String`, representing one parameter of a request `Content-Type` header.
46pub type RequestContentTypeParameter = String;