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

Method new

atomic-repository/src/repository/projection_commit.rs:94–100  ·  view source on GitHub ↗

Build from the configured map. Empty keys/values are ignored so a partially written config cannot map an email to no identity.

(entries: BTreeMap<String, String>)

Source from the content-addressed store, hash-verified

92 /// Build from the configured map. Empty keys/values are ignored so a
93 /// partially written config cannot map an email to no identity.
94 pub fn new(entries: BTreeMap<String, String>) -> Self {
95 let entries = entries
96 .into_iter()
97 .filter(|(email, did)| !email.is_empty() && !did.trim().is_empty())
98 .collect();
99 Self { entries }
100 }
101
102 /// The DID for an email: configured mapping, else the deterministic
103 /// foreign `did:atomic:git:<email-hash>` identity (RFC §5.5).

Callers

nothing calls this directly

Calls 3

collectMethod · 0.45
into_iterMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected