@@ -28,20 +28,28 @@ pub mod signature;
28
28
#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
29
29
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
30
30
pub struct Identity {
31
- /// The actors name.
31
+ /// The actors name, potentially with whitespace as parsed.
32
+ ///
33
+ /// Use [IdentityRef::trim()] or trim manually to be able to clean it up.
32
34
pub name : BString ,
33
- /// The actor's email.
35
+ /// The actor's email, potentially with whitespace and garbage as parsed.
36
+ ///
37
+ /// Use [IdentityRef::trim()] or trim manually to be able to clean it up.
34
38
pub email : BString ,
35
39
}
36
40
37
41
/// A person with name and email, as reference.
38
42
#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone , Copy ) ]
39
43
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
40
44
pub struct IdentityRef < ' a > {
41
- /// The actors name.
45
+ /// The actors name, potentially with whitespace as parsed.
46
+ ///
47
+ /// Use [IdentityRef::trim()] or trim manually to be able to clean it up.
42
48
#[ cfg_attr( feature = "serde" , serde( borrow) ) ]
43
49
pub name : & ' a BStr ,
44
- /// The actor's email.
50
+ /// The actor's email, potentially with whitespace and garbage as parsed.
51
+ ///
52
+ /// Use [IdentityRef::trim()] or trim manually to be able to clean it up.
45
53
pub email : & ' a BStr ,
46
54
}
47
55
@@ -51,9 +59,13 @@ pub struct IdentityRef<'a> {
51
59
#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
52
60
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
53
61
pub struct Signature {
54
- /// The actors name.
62
+ /// The actors name, potentially with whitespace as parsed.
63
+ ///
64
+ /// Use [SignatureRef::trim()] or trim manually to be able to clean it up.
55
65
pub name : BString ,
56
- /// The actor's email.
66
+ /// The actor's email, potentially with whitespace and garbage as parsed.
67
+ ///
68
+ /// Use [SignatureRef::trim()] or trim manually to be able to clean it up.
57
69
pub email : BString ,
58
70
/// The time stamp at which the signature is performed.
59
71
pub time : Time ,
@@ -65,10 +77,14 @@ pub struct Signature {
65
77
#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone , Copy ) ]
66
78
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
67
79
pub struct SignatureRef < ' a > {
68
- /// The actor's name.
80
+ /// The actors name, potentially with whitespace as parsed.
81
+ ///
82
+ /// Use [SignatureRef::trim()] or trim manually to be able to clean it up.
69
83
#[ cfg_attr( feature = "serde" , serde( borrow) ) ]
70
84
pub name : & ' a BStr ,
71
- /// The actor's email.
85
+ /// The actor's email, potentially with whitespace and garbage as parsed.
86
+ ///
87
+ /// Use [SignatureRef::trim()] or trim manually to be able to clean it up.
72
88
pub email : & ' a BStr ,
73
89
/// The time stamp at which the signature was performed.
74
90
pub time : gix_date:: Time ,
0 commit comments