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