[−][src]Struct nyaadesu::Torrent
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
.
pub fn magnet_link(&self) -> Option<String>
[src]
Extract magnet link as String
.
Trait Implementations
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,