intermodal/src/file_info.rs
Casey Rodarmor 6549850dac
Add initial implementation of imdl torrent verify
Adds the command `imdl` torrent verify` to verify the contents of torrents.

This implementation is extremely naive. It does successfully verify torrents,
but it will produce unsatisfying results when a torrent fails verification. In
particular, it won't give any information about which pieces in a file were
corrupt.

type: added
2020-04-07 19:01:05 -07:00

14 lines
312 B
Rust

use crate::common::*;
#[derive(Deserialize, Serialize, Debug, PartialEq, Clone)]
pub(crate) struct FileInfo {
pub(crate) length: Bytes,
pub(crate) path: FilePath,
#[serde(
skip_serializing_if = "Option::is_none",
default,
with = "unwrap_or_skip"
)]
pub(crate) md5sum: Option<Md5Digest>,
}