Create a new author with name and optional email. # Arguments `name` - The author's display name `email` - Optional email address # Examples ```rust use atomic_core::change::Author; let author = Author::new("Alice", Some("alice@example.com")); assert_eq!(author.name, "Alice"); assert_eq!(author.email, Some("alice@example.com".to_string())); let author = Author::new("Bob", None:: ); as
(name: impl Into<String>, email: Option<impl Into<String>>)
| 77 | /// assert!(author.email.is_none()); |
| 78 | /// ``` |
| 79 | pub fn new(name: impl Into<String>, email: Option<impl Into<String>>) -> Self { |
| 80 | Self { |
| 81 | name: name.into(), |
| 82 | email: email.map(Into::into), |
| 83 | identity: None, |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /// Create an author with an associated cryptographic identity. |
| 88 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected