use crate::{AuthorID, DirectoryEntry, ObjectID, SnapShotDirectory};
use serde::{Deserialize, Serialize};
use std::{
collections::{BTreeMap, BTreeSet},
fmt::{Display, Formatter},
path::PathBuf,
};
pub mod differences;
pub mod directory;
pub mod initialize;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SnapShot {
pub directory: ObjectID,
pub previous: BTreeSet<ObjectID>,
pub data: SnapShotData,
}
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
pub struct SnapShotData {
pub kind: u32,
pub message: String,
pub authors: BTreeSet<AuthorID>,
}
#[derive(Copy, Debug, Clone)]
pub enum SnapShotKind {
Initialization = 0,
Fix,
Test,
}
impl Eq for SnapShot {}
impl PartialEq for SnapShot {
fn eq(&self, other: &Self) -> bool {
self.directory.eq(&other.directory) && self.previous.eq(&other.previous)
}
}