src/backup/backup_info.rs: impl Display for BackupGroup

This commit is contained in:
Dietmar Maurer 2020-06-24 12:25:45 +02:00
parent a6f8728339
commit 23f74c190e
1 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,14 @@ impl BackupGroup {
}
}
impl std::fmt::Display for BackupGroup {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let backup_type = self.backup_type();
let id = self.backup_id();
write!(f, "{}/{}", backup_type, id)
}
}
impl std::str::FromStr for BackupGroup {
type Err = Error;