intermodal/src/info.rs

15 lines
358 B
Rust
Raw Normal View History

2019-05-24 10:25:55 +02:00
use crate::common::*;
#[derive(Deserialize, Serialize)]
pub(crate) struct Info {
pub(crate) private: Option<u8>,
2019-05-24 10:25:55 +02:00
#[serde(rename = "piece length")]
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")]
pub(crate) pieces: Vec<u8>,
2019-05-24 10:25:55 +02:00
#[serde(flatten)]
pub(crate) mode: Mode,
2019-05-24 10:25:55 +02:00
}