datastore: cleanup and document backup group/dir openers

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2022-04-20 13:24:57 +02:00
parent 10a0059602
commit 6b0c6492f7
6 changed files with 50 additions and 69 deletions

View File

@ -14,10 +14,8 @@ pub struct BackupGroup {
}
impl BackupGroup {
pub(crate) fn new<T: Into<String>>(backup_type: BackupType, backup_id: T) -> Self {
Self {
group: (backup_type, backup_id.into()).into(),
}
pub(crate) fn new(group: pbs_api_types::BackupGroup) -> Self {
Self { group }
}
/// Access the underlying [`BackupGroup`](pbs_api_types::BackupGroup).