src/backup/catalog.rs: derive Clone for DirEntry and DirEntryAttribute

This is needed in order to explicitly clone the values when needed in the
catalog shell implementation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2019-11-14 17:42:18 +01:00 committed by Dietmar Maurer
parent c9f002213e
commit 6dba015043
1 changed files with 2 additions and 0 deletions

View File

@ -53,12 +53,14 @@ impl fmt::Display for CatalogEntryType {
///
/// The ``attr`` property contain the exact type with type specific
/// attributes.
#[derive(Clone)]
pub struct DirEntry {
pub name: Vec<u8>,
pub attr: DirEntryAttribute,
}
/// Used to specific additional attributes inside DirEntry
#[derive(Clone)]
pub enum DirEntryAttribute {
Directory { start: u64 },
File { size: u64, mtime: u64 },