[][src]Struct rarbg_api::torrent::Torrent

pub struct Torrent { /* fields omitted */ }

Implementations

impl Torrent[src]

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

Return the title.

Only available when format is set to Format::JsonExtended.

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

Return the filename

Only available when format is set to Format::Json.

pub fn category(&self) -> &Category[src]

Return the category that the torrent belongs to.

pub fn download(&self) -> &String[src]

Return a magnet link.

pub fn seeders(&self) -> &Option<u32>[src]

Return the number of seeders available.

Only available when format is set to Format::JsonExtended.

pub fn leechers(&self) -> &Option<u32>[src]

Return the number of leechers.

Only available when format is set to Format::JsonExtended.

pub fn size(&self) -> &Option<u128>[src]

Return the size in bytes.

Only available when format is set to Format::JsonExtended.

pub fn pub_date(&self) -> &Option<DateTime<Utc>>[src]

Return the publication date.

DateTime is always synchronize with UTC.

Only available when format is set to Format::JsonExtended.

pub fn episode_info(&self) -> &Option<EpisodeInfo>[src]

Return the episode info.

Only available when format is set to Format::JsonExtended.

pub fn ranked(&self) -> &Option<bool>[src]

Return true if it's a scene, rarbg or rartv releases, otherwise false.

Only available when format is set to Format::JsonExtended.

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

Return an HTTP link that redirect to the torrent page.

Only available when format is set to Format::JsonExtended.

pub fn export(&self, path: &str) -> Result<String, Error>[src]

Export the torrent to a magnet file using its title, filename or UUID as filename.

Arguments

  • path - A string slice that holds a path to a folder

Trait Implementations

impl Clone for Torrent[src]

impl Debug for Torrent[src]

impl<'de> Deserialize<'de> for Torrent[src]

impl Display for Torrent[src]

impl Serialize for Torrent[src]

Auto Trait Implementations

impl RefUnwindSafe for Torrent

impl Send for Torrent

impl Sync for Torrent

impl Unpin for Torrent

impl UnwindSafe for Torrent

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,