pub struct LtSession { /* private fields */ }Implementations§
Source§impl LtSession
impl LtSession
pub fn new() -> LtSession
pub fn new_with_settings(settings: &SettingsPack) -> LtSession
pub fn add_torrent<'a>( &'a mut self, _params: &AddTorrentParamsRef<'_>, ) -> TorrentHandle
pub fn async_add_torrent<T: AddTorrentParamsIntoPtr>(&mut self, params: &T)
pub fn pop_alerts(&mut self)
pub fn alerts(&self) -> &Vec<Alert>
Sourcepub fn post_torrent_updates(&mut self, flags: StatusFlags)
pub fn post_torrent_updates(&mut self, flags: StatusFlags)
This functions instructs the session to post the state_update_alert, containing the status of all torrents whose state changed since the last time this function was called.
Only torrents who has the state subscription flag set will be included. This flag is on by default.
Sourcepub unsafe fn take_alerts(&mut self) -> Vec<Alert>
pub unsafe fn take_alerts(&mut self) -> Vec<Alert>
Marked as unsafe because it takes ownership of the alerts. If the session pops alerts again the alerts will become invalid.
As long LtSession::pop_alerts() is not called again the alerts are valid
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LtSession
impl RefUnwindSafe for LtSession
impl !Sync for LtSession
impl Unpin for LtSession
impl UnwindSafe for LtSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more