2019-05-24 10:25:55 +02:00
|
|
|
use crate::common::*;
|
|
|
|
|
|
|
|
#[derive(Deserialize, Serialize)]
|
2020-02-04 17:51:56 +01:00
|
|
|
pub(crate) struct Info {
|
|
|
|
pub(crate) private: Option<u8>,
|
2019-05-24 10:25:55 +02:00
|
|
|
#[serde(rename = "piece length")]
|
2020-02-04 17:51:56 +01:00
|
|
|
pub(crate) piece_length: u32,
|
|
|
|
pub(crate) name: String,
|
|
|
|
pub(crate) source: Option<String>,
|
2019-05-24 10:25:55 +02:00
|
|
|
#[serde(with = "serde_bytes")]
|
2020-02-04 17:51:56 +01:00
|
|
|
pub(crate) pieces: Vec<u8>,
|
2019-05-24 10:25:55 +02:00
|
|
|
#[serde(flatten)]
|
2020-02-04 17:51:56 +01:00
|
|
|
pub(crate) mode: Mode,
|
2019-05-24 10:25:55 +02:00
|
|
|
}
|