(self)
| 67 | |
| 68 | impl NameOrIdentity { |
| 69 | pub fn into_string(self) -> String { |
| 70 | match self { |
| 71 | NameOrIdentity::Identity(addr) => Identity::from(addr).to_hex().to_string(), |
| 72 | NameOrIdentity::Name(name) => name.into(), |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | pub fn name(&self) -> Option<&DatabaseName> { |
| 77 | if let Self::Name(name) = self { |