use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::model::discovery::DiscoveryItem; use super::MessageTarget; #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)] pub struct DiscoveryOffer { pub earliest: DateTime, pub hashes: Vec, } #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)] pub struct DiscoveryRequest { pub since: DateTime, pub hashes: Vec, } impl MessageTarget for DiscoveryRequest { fn target(&self) -> Option { None } } #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)] pub struct Discoveries { pub discoveries: Vec, }