use std::hash::{Hasher, Hash}; use serde::{Deserialize, Serialize}; use crate::vector::FileVector; /// Represents one file which was indexed. #[derive(Clone, Debug, Default, Serialize, Deserialize)] pub struct FileCache { pub path : String, pub vector : FileVector, } impl PartialEq for FileCache { fn eq(&self, other : &Self) -> bool { self.path == other.path } } impl Eq for FileCache { } impl Hash for FileCache { fn hash(&self, state: &mut H) { self.path.hash(state); } }