[][src]Struct nyaadesu::Torrent

pub struct Torrent {
    pub category: Category,
    pub name: String,
    pub links: (Option<String>, Option<String>),
    pub size: u64,
    pub date: u64,
    pub seeders: u32,
    pub leechers: u32,
    pub completed_downloads: u32,
}

Struct that represents a torrent and contains some of its basic information.

Fields

category: Category

The category of the torrent.

name: String

The name of the torrent.

links: (Option<String>, Option<String>)

Links for the torrent (magnet and .torrent) as a pair. If you want to get a url to the .torrent file or the magnet please use the torrent_file or the magnet_link methods.

size: u64

Total size of the torrent's files in bytes.

date: u64

Date of pubblication of the torrent as unix timestamp.

seeders: u32

Number of seeders.

leechers: u32

Number of leechers.

completed_downloads: u32

Number of completed downloads.

Methods

impl Torrent[src]

pub fn torrent_file(&self) -> Option<String>[src]

Extract .torrent's file url as String.

Extract magnet link as String.

Trait Implementations

impl Debug for Torrent[src]

Auto Trait Implementations

impl Send for Torrent

impl Unpin for Torrent

impl Sync for Torrent

impl UnwindSafe for Torrent

impl RefUnwindSafe for Torrent

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err