MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-core/src/change/header.rs:79–85  ·  view source on GitHub ↗

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>>)

Source from the content-addressed store, hash-verified

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 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected