[][src]Struct deluge_rpc::Session

pub struct Session { /* fields omitted */ }

Implementations

impl Session[src]

pub async fn connect(endpoint: impl ToSocketAddrs) -> Result<Self>[src]

pub async fn disconnect(self) -> Result<(), (TlsStream<TcpStream>, Error)>[src]

pub fn subscribe_events(&self) -> Receiver<Event>[src]

impl Session[src]

pub async fn daemon_info<'_>(&'_ self) -> Result<String>[src]

pub async fn login<'_, '_, '_>(
    &'_ mut self,
    username: &'_ str,
    password: &'_ str
) -> Result<AuthLevel>
[src]

pub async fn set_event_interest<'_, '_>(
    &'_ self,
    events: &'_ HashSet<EventKind>
) -> Result<bool>
[src]

pub async fn shutdown<'_>(&'_ self) -> Result<()>[src]

pub async fn get_method_list<'_>(&'_ self) -> Result<Vec<String>>[src]

pub async fn get_version<'_>(&'_ self) -> Result<String>[src]

pub async fn authorized_call<'_, '_>(&'_ self, rpc: &'_ str) -> Result<bool>[src]

impl Session[src]

pub async fn add_torrent_file<'_, '_, '_, '_>(
    &'_ self,
    filename: &'_ str,
    filedump: &'_ str,
    options: &'_ TorrentOptions
) -> Result<Option<InfoHash>>
[src]

pub async fn add_torrent_files<'_, '_, '_, '_, '_>(
    &'_ self,
    torrent_files: &'_ [(&'_ str, &'_ str, &'_ TorrentOptions)]
) -> Result<()>
[src]

pub async fn add_torrent_magnet<'_, '_, '_>(
    &'_ self,
    uri: &'_ str,
    options: &'_ TorrentOptions
) -> Result<InfoHash>
[src]

pub async fn add_torrent_url<'_, '_, '_, '_>(
    &'_ self,
    url: &'_ str,
    options: &'_ TorrentOptions,
    headers: Option<&'_ HashMap<String, String>>
) -> Result<Option<InfoHash>>
[src]

pub async fn connect_peer<'_>(
    &'_ self,
    torrent_id: InfoHash,
    peer_addr: SocketAddr
) -> Result<()>
[src]

pub async fn create_account<'_, '_, '_>(
    &'_ self,
    username: &'_ str,
    password: &'_ str,
    auth_level: AuthLevel
) -> Result<()>
[src]

pub async fn create_torrent<'_, '_, '_, '_, '_, '_, '_>(
    &'_ self,
    path: &'_ str,
    comment: &'_ str,
    target: &'_ str,
    webseeds: &'_ [&'_ str],
    private: bool,
    created_by: &'_ str,
    add_to_session: bool
) -> Result<()>
[src]

pub async fn disable_plugin<'_, '_>(&'_ self, plugin: &'_ str) -> Result<()>[src]

pub async fn enable_plugin<'_, '_>(&'_ self, plugin: &'_ str) -> Result<()>[src]

pub async fn force_reannounce<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn force_recheck<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn get_auth_levels_mappings<'_>(
    &'_ self
) -> Result<(HashMap<String, AuthLevel>, HashMap<AuthLevel, String>)>
[src]

pub async fn get_config<'_, T: DeserializeOwned>(
    &'_ self
) -> Result<HashMap<String, T>>
[src]

pub async fn get_config_value<'_, '_, T: DeserializeOwned>(
    &'_ self,
    key: &'_ str
) -> Result<T>
[src]

pub async fn get_config_values<'_, '_, '_, T: DeserializeOwned>(
    &'_ self,
    keys: &'_ [&'_ str]
) -> Result<HashMap<String, T>>
[src]

pub async fn get_enabled_plugins<'_>(&'_ self) -> Result<Vec<String>>[src]

pub async fn get_external_ip<'_>(&'_ self) -> Result<IpAddr>[src]

pub async fn get_filter_tree<'_, '_, '_>(
    &'_ self,
    show_zero_hits: bool,
    hide_cat: &'_ [&'_ str]
) -> Result<FnvHashMap<FilterKey, Vec<(String, u64)>>>
[src]

pub async fn get_free_space<'_, '_>(
    &'_ self,
    path: Option<&'_ str>
) -> Result<u64>
[src]

pub async fn get_known_accounts<'_, T: DeserializeOwned>(
    &'_ self
) -> Result<Vec<HashMap<String, T>>>
[src]

pub async fn get_libtorrent_version<'_>(&'_ self) -> Result<String>[src]

pub async fn get_listen_port<'_>(&'_ self) -> Result<u16>[src]

pub async fn get_path_size<'_, '_>(&'_ self, path: &'_ str) -> Result<i64>[src]

pub async fn get_proxy<'_, T: DeserializeOwned>(&'_ self) -> Result<T>[src]

pub async fn get_session_state<'_>(&'_ self) -> Result<Vec<InfoHash>>[src]

pub async fn get_session_status<'_, '_, '_, T: DeserializeOwned>(
    &'_ self,
    keys: &'_ [&'_ str]
) -> Result<HashMap<String, T>>
[src]

pub async fn get_torrent_status_dyn<'_, '_, '_, T: DeserializeOwned>(
    &'_ self,
    torrent_id: InfoHash,
    keys: &'_ [&'_ str],
    diff: bool
) -> Result<T>
[src]

pub async fn get_torrent_status<'_, T: Query>(
    &'_ self,
    torrent_id: InfoHash
) -> Result<T>
[src]

pub async fn get_torrent_status_diff<'_, T: Query>(
    &'_ self,
    torrent_id: InfoHash
) -> Result<T::Diff>
[src]

pub async fn get_torrents_status_dyn<'_, '_, '_, '_, T: DeserializeOwned>(
    &'_ self,
    filter_dict: Option<&'_ FilterDict>,
    keys: &'_ [&'_ str],
    diff: bool
) -> Result<FnvHashMap<InfoHash, T>>
[src]

pub async fn get_torrents_status<'_, '_, T: Query>(
    &'_ self,
    filter_dict: Option<&'_ FilterDict>
) -> Result<FnvHashMap<InfoHash, T>>
[src]

pub async fn get_torrents_status_diff<'_, '_, T: Query>(
    &'_ self,
    filter_dict: Option<&'_ FilterDict>
) -> Result<FnvHashMap<InfoHash, T::Diff>>
[src]

pub async fn glob<'_, '_>(&'_ self, path: &'_ str) -> Result<Vec<String>>[src]

pub async fn is_libtorrent_session_paused<'_>(&'_ self) -> Result<bool>[src]

pub async fn move_storage<'_, '_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash],
    dest: &'_ str
) -> Result<()>
[src]

pub async fn pause_libtorrent_session<'_>(&'_ self) -> Result<()>[src]

pub async fn pause_torrent<'_>(&'_ self, torrent_id: InfoHash) -> Result<()>[src]

pub async fn pause_torrents<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn prefetch_magnet_metadata<'_, '_, T: DeserializeOwned>(
    &'_ self,
    magnet: &'_ str,
    timeout: u64
) -> Result<(InfoHash, HashMap<String, T>)>
[src]

pub async fn queue_bottom<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn queue_down<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn queue_top<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn queue_up<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn remove_account<'_, '_>(&'_ self, username: &'_ str) -> Result<()>[src]

pub async fn remove_torrent<'_>(
    &'_ self,
    torrent_id: InfoHash,
    remove_data: bool
) -> Result<()>
[src]

pub async fn remove_torrents<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash],
    remove_data: bool
) -> Result<()>
[src]

pub async fn rename_files<'_, '_, '_>(
    &'_ self,
    torrent_id: InfoHash,
    filenames: &'_ [(u64, &'_ str)]
) -> Result<()>
[src]

pub async fn rename_folder<'_, '_, '_>(
    &'_ self,
    torrent_id: InfoHash,
    folder: &'_ str,
    new_folder: &'_ str
) -> Result<()>
[src]

pub async fn rescan_plugins<'_>(&'_ self) -> Result<()>[src]

pub async fn resume_libtorrent_session<'_>(&'_ self) -> Result<()>[src]

pub async fn resume_torrent<'_>(&'_ self, torrent_id: InfoHash) -> Result<()>[src]

pub async fn resume_torrents<'_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash]
) -> Result<()>
[src]

pub async fn set_config<'_, '_>(
    &'_ self,
    config: &'_ HashMap<String, impl Serialize>
) -> Result<()>
[src]

pub async fn set_torrent_options<'_, '_, '_>(
    &'_ self,
    torrent_ids: &'_ [InfoHash],
    options: &'_ TorrentOptions
) -> Result<()>
[src]

pub async fn test_listen_port<'_>(&'_ self) -> Result<bool>[src]

pub async fn update_account<'_, '_, '_>(
    &'_ self,
    username: &'_ str,
    password: &'_ str,
    auth_level: AuthLevel
) -> Result<()>
[src]

pub async fn upload_plugin<'_, '_, '_>(
    &'_ self,
    filename: &'_ str,
    filedump: &'_ [u8]
) -> Result<()>
[src]

impl Session[src]

pub async fn get_labels<'_>(&'_ self) -> Result<Vec<String>>[src]

pub async fn add_label<'_, '_>(&'_ self, label_id: &'_ str) -> Result<()>[src]

pub async fn remove_label<'_, '_>(&'_ self, label_id: &'_ str) -> Result<()>[src]

pub async fn get_label_options<'_, '_, T: DeserializeOwned>(
    &'_ self,
    label_id: &'_ str
) -> Result<HashMap<String, T>>
[src]

pub async fn set_label_options<'_, '_, '_>(
    &'_ self,
    label_id: &'_ str,
    options: &'_ HashMap<String, impl Serialize>
) -> Result<()>
[src]

pub async fn set_torrent_label<'_, '_>(
    &'_ self,
    torrent_id: InfoHash,
    label_id: &'_ str
) -> Result<()>
[src]

pub async fn get_label_config<'_, T: DeserializeOwned>(
    &'_ self
) -> Result<HashMap<String, T>>
[src]

pub async fn set_label_config<'_, '_>(
    &'_ self,
    config: &'_ HashMap<String, impl Serialize>
) -> Result<()>
[src]

Trait Implementations

impl Debug for Session[src]

Auto Trait Implementations

impl !RefUnwindSafe for Session

impl Send for Session

impl Sync for Session

impl Unpin for Session

impl !UnwindSafe for Session

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.