lt_rs/alerts/implementations/
save_resume_data.rs

1use crate::add_torrent_params::AddTorrentParamsRef;
2use crate::alerts::SaveResumeDataAlert;
3use crate::ffi::alerts::save_resume_data::ffi::save_resume_data_alert_get_params;
4use crate::torrent_handle::TorrentHandle;
5
6impl SaveResumeDataAlert {
7    #[inline(always)]
8    pub fn handle(&self) -> TorrentHandle {
9        self.as_torrent_alert().handle()
10    }
11
12    #[inline(always)]
13    pub fn torrent_name<'a>(&'a self) -> &'a str {
14        self.as_torrent_alert().torrent_name()
15    }
16
17    #[inline(always)]
18    pub fn message(&self) -> String {
19        self.as_torrent_alert().message()
20    }
21
22    #[inline(always)]
23    pub fn params<'a>(&'a self) -> AddTorrentParamsRef<'a> {
24        unsafe { save_resume_data_alert_get_params(self.0) }.into()
25    }
26}