@@ -28,20 +28,28 @@ pub mod signature;
2828#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
2929#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
3030pub 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.
3234 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.
3438 pub email : BString ,
3539}
3640
3741/// A person with name and email, as reference.
3842#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone , Copy ) ]
3943#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
4044pub 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.
4248 #[ cfg_attr( feature = "serde" , serde( borrow) ) ]
4349 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.
4553 pub email : & ' a BStr ,
4654}
4755
@@ -51,9 +59,13 @@ pub struct IdentityRef<'a> {
5159#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone ) ]
5260#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
5361pub 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.
5565 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.
5769 pub email : BString ,
5870 /// The time stamp at which the signature is performed.
5971 pub time : Time ,
@@ -65,10 +77,14 @@ pub struct Signature {
6577#[ derive( Default , PartialEq , Eq , Debug , Hash , Ord , PartialOrd , Clone , Copy ) ]
6678#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
6779pub 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.
6983 #[ cfg_attr( feature = "serde" , serde( borrow) ) ]
7084 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.
7288 pub email : & ' a BStr ,
7389 /// The time stamp at which the signature was performed.
7490 pub time : gix_date:: Time ,
0 commit comments