1 |
use chrono::{DateTime, Utc};
|
2 |
use serde::{Deserialize, Serialize};
|
3 |
|
4 |
use crate::model::discovery::DiscoveryItem;
|
5 |
|
6 |
#[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
7 |
pub struct DiscoveryOffer {
|
8 |
pub earliest: DateTime<Utc>,
|
9 |
pub hashes: Vec<u128>,
|
10 |
}
|
11 |
|
12 |
#[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
13 |
pub struct DiscoveryRequest {
|
14 |
pub since: DateTime<Utc>,
|
15 |
pub hashes: Vec<u128>,
|
16 |
}
|
17 |
|
18 |
#[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
19 |
pub struct Discoveries {
|
20 |
pub discoveries: Vec<DiscoveryItem>,
|
21 |
}
|
22 |
|