pub struct TorrentContent {
pub index: i32,
pub progress: f64,
pub priority: FilePriority,
pub size: i64,
pub availability: f64,
pub name: String,
pub piece_range: Vec<i32>,
pub is_seed: Option<bool>,
}Expand description
Torrent file/content.
This struct provides detailed information about individual files within a torrent, including their index, name, size, progress, priority, and more.
Fields§
§index: i32File index
progress: f64File progress (percentage/100)
priority: FilePriorityFile priority.
size: i64File size (bytes)
availability: f64Percentage of file pieces currently available (percentage/100)
name: StringFile name (including relative path)
piece_range: Vec<i32>The first number is the starting piece index and the second number is the ending piece index (inclusive)
is_seed: Option<bool>Is file seeding / completed.
Trait Implementations§
Source§impl Clone for TorrentContent
impl Clone for TorrentContent
Source§impl Debug for TorrentContent
impl Debug for TorrentContent
Source§impl Default for TorrentContent
impl Default for TorrentContent
Source§impl<'de> Deserialize<'de> for TorrentContent
impl<'de> Deserialize<'de> for TorrentContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TorrentContent
impl PartialEq for TorrentContent
Source§impl Serialize for TorrentContent
impl Serialize for TorrentContent
impl StructuralPartialEq for TorrentContent
Auto Trait Implementations§
impl Freeze for TorrentContent
impl RefUnwindSafe for TorrentContent
impl Send for TorrentContent
impl Sync for TorrentContent
impl Unpin for TorrentContent
impl UnsafeUnpin for TorrentContent
impl UnwindSafe for TorrentContent
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