@@ -16,7 +16,7 @@ use crate::{
16
16
17
17
// body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP
18
18
// body-fld-enc SP body-fld-octets
19
- fn body_fields ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyFields > {
19
+ fn body_fields ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyFields < ' _ > > {
20
20
let ( i, ( param, _, id, _, description, _, transfer_encoding, _, octets) ) = tuple ( (
21
21
body_param,
22
22
tag ( " " ) ,
@@ -48,7 +48,7 @@ fn body_fields(i: &[u8]) -> IResult<&[u8], BodyFields> {
48
48
// [SP body-fld-loc *(SP body-extension)]]]
49
49
// ; MUST NOT be returned on non-extensible
50
50
// ; "BODY" fetch
51
- fn body_ext_1part ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExt1Part > {
51
+ fn body_ext_1part ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExt1Part < ' _ > > {
52
52
let ( i, ( md5, disposition, language, location, extension) ) = tuple ( (
53
53
// Per RFC 1864, MD5 values are base64-encoded
54
54
opt_opt ( preceded ( tag ( " " ) , nstring_utf8) ) ,
@@ -74,7 +74,7 @@ fn body_ext_1part(i: &[u8]) -> IResult<&[u8], BodyExt1Part> {
74
74
// [SP body-fld-loc *(SP body-extension)]]]
75
75
// ; MUST NOT be returned on non-extensible
76
76
// ; "BODY" fetch
77
- fn body_ext_mpart ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExtMPart > {
77
+ fn body_ext_mpart ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExtMPart < ' _ > > {
78
78
let ( i, ( param, disposition, language, location, extension) ) = tuple ( (
79
79
opt_opt ( preceded ( tag ( " " ) , body_param) ) ,
80
80
opt_opt ( preceded ( tag ( " " ) , body_disposition) ) ,
@@ -95,7 +95,7 @@ fn body_ext_mpart(i: &[u8]) -> IResult<&[u8], BodyExtMPart> {
95
95
) )
96
96
}
97
97
98
- fn body_encoding ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ContentEncoding > {
98
+ fn body_encoding ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ContentEncoding < ' _ > > {
99
99
alt ( (
100
100
delimited (
101
101
char ( '"' ) ,
@@ -127,7 +127,7 @@ fn body_lang(i: &[u8]) -> IResult<&[u8], Option<Vec<Cow<'_, str>>>> {
127
127
) ) ( i)
128
128
}
129
129
130
- fn body_param ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyParams > {
130
+ fn body_param ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyParams < ' _ > > {
131
131
alt ( (
132
132
map ( nil, |_| None ) ,
133
133
map (
@@ -140,7 +140,7 @@ fn body_param(i: &[u8]) -> IResult<&[u8], BodyParams> {
140
140
) ) ( i)
141
141
}
142
142
143
- fn body_extension ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExtension > {
143
+ fn body_extension ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyExtension < ' _ > > {
144
144
alt ( (
145
145
map ( number, BodyExtension :: Num ) ,
146
146
// Cannot find documentation on character encoding for body extension values.
@@ -153,7 +153,7 @@ fn body_extension(i: &[u8]) -> IResult<&[u8], BodyExtension> {
153
153
) ) ( i)
154
154
}
155
155
156
- fn body_disposition ( i : & [ u8 ] ) -> IResult < & [ u8 ] , Option < ContentDisposition > > {
156
+ fn body_disposition ( i : & [ u8 ] ) -> IResult < & [ u8 ] , Option < ContentDisposition < ' _ > > > {
157
157
alt ( (
158
158
map ( nil, |_| None ) ,
159
159
paren_delimited ( map (
@@ -168,7 +168,7 @@ fn body_disposition(i: &[u8]) -> IResult<&[u8], Option<ContentDisposition>> {
168
168
) ) ( i)
169
169
}
170
170
171
- fn body_type_basic ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure > {
171
+ fn body_type_basic ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure < ' _ > > {
172
172
map (
173
173
tuple ( (
174
174
string_utf8,
@@ -201,7 +201,7 @@ fn body_type_basic(i: &[u8]) -> IResult<&[u8], BodyStructure> {
201
201
) ( i)
202
202
}
203
203
204
- fn body_type_text ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure > {
204
+ fn body_type_text ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure < ' _ > > {
205
205
map (
206
206
tuple ( (
207
207
tag_no_case ( "\" TEXT\" " ) ,
@@ -237,7 +237,7 @@ fn body_type_text(i: &[u8]) -> IResult<&[u8], BodyStructure> {
237
237
) ( i)
238
238
}
239
239
240
- fn body_type_message ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure > {
240
+ fn body_type_message ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure < ' _ > > {
241
241
map (
242
242
tuple ( (
243
243
tag_no_case ( "\" MESSAGE\" \" RFC822\" " ) ,
@@ -277,7 +277,7 @@ fn body_type_message(i: &[u8]) -> IResult<&[u8], BodyStructure> {
277
277
) ( i)
278
278
}
279
279
280
- fn body_type_multipart ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure > {
280
+ fn body_type_multipart ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure < ' _ > > {
281
281
map (
282
282
tuple ( ( many1 ( body) , tag ( " " ) , string_utf8, body_ext_mpart) ) ,
283
283
|( bodies, _, subtype, ext) | BodyStructure :: Multipart {
@@ -297,7 +297,7 @@ fn body_type_multipart(i: &[u8]) -> IResult<&[u8], BodyStructure> {
297
297
) ( i)
298
298
}
299
299
300
- pub ( crate ) fn body ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure > {
300
+ pub ( crate ) fn body ( i : & [ u8 ] ) -> IResult < & [ u8 ] , BodyStructure < ' _ > > {
301
301
paren_delimited ( alt ( (
302
302
body_type_text,
303
303
body_type_message,
@@ -306,7 +306,7 @@ pub(crate) fn body(i: &[u8]) -> IResult<&[u8], BodyStructure> {
306
306
) ) ) ( i)
307
307
}
308
308
309
- pub ( crate ) fn msg_att_body_structure ( i : & [ u8 ] ) -> IResult < & [ u8 ] , AttributeValue > {
309
+ pub ( crate ) fn msg_att_body_structure ( i : & [ u8 ] ) -> IResult < & [ u8 ] , AttributeValue < ' _ > > {
310
310
map ( tuple ( ( tag_no_case ( "BODYSTRUCTURE " ) , body) ) , |( _, body) | {
311
311
AttributeValue :: BodyStructure ( body)
312
312
} ) ( i)
0 commit comments