[−][src]Struct transmission::torrent::torrent::Torrent
Representation of a torrent download.
Can be used to start, stop, or get the information of a torrent.
Methods
impl<'a> Torrent
[src]
pub fn parse_torrent_file(path: &str) -> TrResult<TorrentInfo>
[src]
pub fn build() -> TorrentBuilder
[src]
Alias to TorrentBuilder::new()
pub fn start(&self)
[src]
Start or resume the torrent
pub fn stop(&self)
[src]
Stop (pause) the torrent
pub fn remove(self, with_data: bool)
[src]
Removes a torrent from the downloads Consumes the Torrent
pub fn verify(&self)
[src]
Verify the torrent
pub fn name(&self) -> &str
[src]
This torrent's name
pub fn id(&self) -> i32
[src]
The unique ID of the torrent
pub fn stats(&self) -> TorrentStats
[src]
The stats of the torrent as given by Transmission
These are only available after the torrent has been added to a session
pub fn info(&self) -> TorrentInfo
[src]
The info of the torrent as given by Transmission
This is available after the torrent has been parsed and does not need to be added to a session.
pub fn set_ratio(&mut self, limit: f64)
[src]
Set the seed ratio of the torrent
pub fn set_download_dir(&mut self, download_dir: PathBuf)
[src]
Set the download directory of the torrent
pub fn set_priority(&mut self, priority: Priority)
[src]
Set the priority of the torrent
See Priority
for more information
pub fn get_file_index(&self, file: &TorrentFile) -> Option<usize>
[src]
File Related Functions
Get the index of a file in a torrent
pub fn set_file_download(&mut self, file: TorrentFile, download: bool)
[src]
pub fn set_files_download(&mut self, files: Vec<TorrentFile>, download: bool)
[src]
Set whether or not a set of files should be downloaded
pub fn set_files_download_by_id(&mut self, ids: Vec<u32>, download: bool)
[src]
Set whether or not a set of files, by ids, should be downloaded
pub fn set_file_priority(&mut self, file: TorrentFile, priority: Priority)
[src]
pub fn set_files_priorities(
&mut self,
files: Vec<TorrentFile>,
priority: Priority
)
[src]
&mut self,
files: Vec<TorrentFile>,
priority: Priority
)
Set the priority of a set of files
pub fn set_files_priorities_by_id(&mut self, ids: Vec<u32>, priority: Priority)
[src]
Set the priority of a set of files, by ids
Trait Implementations
impl AsMut<Torrent> for Torrent
[src]
impl Sync for Torrent
[src]
impl Clone for Torrent
[src]
fn clone(&self) -> Torrent
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Send for Torrent
[src]
impl Serialize for Torrent
[src]
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,