1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//TODO potentially move HeaderTryFrom to `mail-headers`
use ComponentCreationError;
//TODO replace with std TryFrom once it is stable
// (either a hard replace, or a soft replace which implements HeaderTryFrom if TryFrom exist)
/// Workaround for `TryFrom`,`TryInto` not being stable.
/// Workaround for `TryFrom`,`TryInto` not being stable.
// It is not possible to auto-implement HeaderTryFrom for From/Into as
// this will make new HeaderTryFrom implementations outside of this care
// nearly impossible making the trait partially useless
//
//impl<T, F> HeaderTryFrom<F> for T where F: Into<T> {
// fn try_from(val: F) -> Result<T, Error> {
// Ok( val.into() )
// }
//}