pub struct TorrentInfo {
pub info_hash: Id20,
pub name: String,
pub total_length: u64,
pub piece_length: u64,
pub num_pieces: u32,
pub files: Vec<FileInfo>,
pub private: bool,
}Expand description
Metadata about a torrent (available after metadata is fetched).
Fields§
§info_hash: Id20SHA-1 info hash of the torrent.
name: StringDisplay name from the torrent metadata.
total_length: u64Total size of all files in bytes.
piece_length: u64Size of each piece in bytes (last piece may be smaller).
num_pieces: u32Total number of pieces in the torrent.
files: Vec<FileInfo>List of files contained in the torrent.
private: boolWhether this is a private torrent (DHT/PEX disabled).
Trait Implementations§
Source§impl Clone for TorrentInfo
impl Clone for TorrentInfo
Source§fn clone(&self) -> TorrentInfo
fn clone(&self) -> TorrentInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TorrentInfo
impl Debug for TorrentInfo
Auto Trait Implementations§
impl Freeze for TorrentInfo
impl RefUnwindSafe for TorrentInfo
impl Send for TorrentInfo
impl Sync for TorrentInfo
impl Unpin for TorrentInfo
impl UnsafeUnpin for TorrentInfo
impl UnwindSafe for TorrentInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more