Complete skeleton dispatcher
- Complete the dispatcher for the 'introducer' and 'local' command. This is currently only a skeleton. - The 'introducer list' command is added.
This commit is contained in:
@@ -56,3 +56,17 @@ impl Introducer {
|
||||
}
|
||||
}
|
||||
|
||||
use std::fmt::{Display, Formatter};
|
||||
impl Display for Introducer {
|
||||
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
let uids = self.cert.userids()
|
||||
.map(|u| String::from_utf8_lossy(u.userid().value()).to_string())
|
||||
.collect::<Vec<String>>()
|
||||
.join(", ");
|
||||
write!(f, "Introducer: {}\n", self.cert.fingerprint())?;
|
||||
write!(f, " UserIDs: {}", uids)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user