Struct Preferences

Source
pub struct Preferences {
Show 146 fields pub locale: Option<String>, pub create_subfolder_enabled: Option<bool>, pub start_paused_enabled: Option<bool>, pub auto_delete_mode: Option<i64>, pub preallocate_all: Option<bool>, pub incomplete_files_ext: Option<bool>, pub auto_tmm_enabled: Option<bool>, pub torrent_changed_tmm_enabled: Option<bool>, pub save_path_changed_tmm_enabled: Option<bool>, pub category_changed_tmm_enabled: Option<bool>, pub save_path: Option<String>, pub temp_path_enabled: Option<bool>, pub temp_path: Option<String>, pub scan_dirs: Option<HashMap<PathBuf, ScanDirValue>>, pub export_dir: Option<String>, pub export_dir_fin: Option<String>, pub mail_notification_enabled: Option<bool>, pub mail_notification_sender: Option<String>, pub mail_notification_email: Option<String>, pub mail_notification_smtp: Option<String>, pub mail_notification_ssl_enabled: Option<bool>, pub mail_notification_auth_enabled: Option<bool>, pub mail_notification_username: Option<String>, pub mail_notification_password: Option<String>, pub autorun_enabled: Option<bool>, pub autorun_program: Option<String>, pub queueing_enabled: Option<bool>, pub max_active_downloads: Option<i64>, pub max_active_torrents: Option<i64>, pub max_active_uploads: Option<i64>, pub dont_count_slow_torrents: Option<bool>, pub slow_torrent_dl_rate_threshold: Option<i64>, pub slow_torrent_ul_rate_threshold: Option<i64>, pub slow_torrent_inactive_timer: Option<i64>, pub max_ratio_enabled: Option<bool>, pub max_ratio: Option<f64>, pub max_ratio_act: Option<i64>, pub listen_port: Option<i64>, pub upnp: Option<bool>, pub random_port: Option<bool>, pub dl_limit: Option<i64>, pub up_limit: Option<i64>, pub max_connec: Option<i64>, pub max_connec_per_torrent: Option<i64>, pub max_uploads: Option<i64>, pub max_uploads_per_torrent: Option<i64>, pub stop_tracker_timeout: Option<i64>, pub enable_piece_extent_affinity: Option<bool>, pub bittorrent_protocol: Option<i64>, pub limit_utp_rate: Option<bool>, pub limit_tcp_overhead: Option<bool>, pub limit_lan_peers: Option<bool>, pub alt_dl_limit: Option<i64>, pub alt_up_limit: Option<i64>, pub scheduler_enabled: Option<bool>, pub schedule_from_hour: Option<i64>, pub schedule_from_min: Option<i64>, pub schedule_to_hour: Option<i64>, pub schedule_to_min: Option<i64>, pub scheduler_days: Option<i64>, pub dht: Option<bool>, pub pex: Option<bool>, pub lsd: Option<bool>, pub encryption: Option<i64>, pub anonymous_mode: Option<bool>, pub proxy_type: Option<IntOrStr>, pub proxy_ip: Option<String>, pub proxy_port: Option<i64>, pub proxy_peer_connections: Option<bool>, pub proxy_auth_enabled: Option<bool>, pub proxy_username: Option<String>, pub proxy_password: Option<String>, pub proxy_torrents_only: Option<bool>, pub ip_filter_enabled: Option<bool>, pub ip_filter_path: Option<String>, pub ip_filter_trackers: Option<bool>, pub web_ui_domain_list: Option<String>, pub web_ui_address: Option<String>, pub web_ui_port: Option<i64>, pub web_ui_upnp: Option<bool>, pub web_ui_username: Option<String>, pub web_ui_password: Option<String>, pub web_ui_csrf_protection_enabled: Option<bool>, pub web_ui_clickjacking_protection_enabled: Option<bool>, pub web_ui_secure_cookie_enabled: Option<bool>, pub web_ui_max_auth_fail_count: Option<i64>, pub web_ui_ban_duration: Option<i64>, pub web_ui_session_timeout: Option<i64>, pub web_ui_host_header_validation_enabled: Option<bool>, pub bypass_local_auth: Option<bool>, pub bypass_auth_subnet_whitelist_enabled: Option<bool>, pub bypass_auth_subnet_whitelist: Option<String>, pub alternative_webui_enabled: Option<bool>, pub alternative_webui_path: Option<String>, pub use_https: Option<bool>, pub ssl_key: Option<String>, pub ssl_cert: Option<String>, pub web_ui_https_key_path: Option<String>, pub web_ui_https_cert_path: Option<String>, pub dyndns_enabled: Option<bool>, pub dyndns_service: Option<i64>, pub dyndns_username: Option<String>, pub dyndns_password: Option<String>, pub dyndns_domain: Option<String>, pub rss_refresh_interval: Option<i64>, pub rss_max_articles_per_feed: Option<i64>, pub rss_processing_enabled: Option<bool>, pub rss_auto_downloading_enabled: Option<bool>, pub rss_download_repack_proper_episodes: Option<bool>, pub rss_smart_episode_filters: Option<String>, pub add_trackers_enabled: Option<bool>, pub add_trackers: Option<String>, pub web_ui_use_custom_http_headers_enabled: Option<bool>, pub web_ui_custom_http_headers: Option<String>, pub max_seeding_time_enabled: Option<bool>, pub max_seeding_time: Option<i64>, pub announce_ip: Option<String>, pub announce_to_all_tiers: Option<bool>, pub announce_to_all_trackers: Option<bool>, pub async_io_threads: Option<i64>, pub banned_ips: Option<String>, pub checking_memory_use: Option<i64>, pub current_interface_address: Option<String>, pub current_network_interface: Option<String>, pub disk_cache: Option<i64>, pub disk_cache_ttl: Option<i64>, pub embedded_tracker_port: Option<i64>, pub enable_coalesce_read_write: Option<bool>, pub enable_embedded_tracker: Option<bool>, pub enable_multi_connections_from_same_ip: Option<bool>, pub enable_os_cache: Option<bool>, pub enable_upload_suggestions: Option<bool>, pub file_pool_size: Option<i64>, pub outgoing_ports_max: Option<i64>, pub outgoing_ports_min: Option<i64>, pub recheck_completed_torrents: Option<bool>, pub resolve_peer_countries: Option<bool>, pub save_resume_data_interval: Option<i64>, pub send_buffer_low_watermark: Option<i64>, pub send_buffer_watermark: Option<i64>, pub send_buffer_watermark_factor: Option<i64>, pub socket_backlog_size: Option<i64>, pub upload_choking_algorithm: Option<i64>, pub upload_slots_behavior: Option<i64>, pub upnp_lease_duration: Option<i64>, pub utp_tcp_mixed_mode: Option<i64>,
}

Fields§

§locale: Option<String>

Currently selected language (e.g. en_GB for English)

§create_subfolder_enabled: Option<bool>

True if a subfolder should be created when adding a torrent

§start_paused_enabled: Option<bool>

True if torrents should be added in a Paused state

§auto_delete_mode: Option<i64>

TODO

§preallocate_all: Option<bool>

True if disk space should be pre-allocated for all files

§incomplete_files_ext: Option<bool>

True if “.!qB” should be appended to incomplete files

§auto_tmm_enabled: Option<bool>

True if Automatic Torrent Management is enabled by default

§torrent_changed_tmm_enabled: Option<bool>

True if torrent should be relocated when its Category changes

§save_path_changed_tmm_enabled: Option<bool>

True if torrent should be relocated when the default save path changes

§category_changed_tmm_enabled: Option<bool>

True if torrent should be relocated when its Category’s save path changes

§save_path: Option<String>

Default save path for torrents, separated by slashes

§temp_path_enabled: Option<bool>

True if folder for incomplete torrents is enabled

§temp_path: Option<String>

Path for incomplete torrents, separated by slashes

§scan_dirs: Option<HashMap<PathBuf, ScanDirValue>>

Property: directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified

§export_dir: Option<String>

Path to directory to copy .torrent files to. Slashes are used as path separators

§export_dir_fin: Option<String>

Path to directory to copy .torrent files of completed downloads to. Slashes are used as path separators

§mail_notification_enabled: Option<bool>

True if e-mail notification should be enabled

§mail_notification_sender: Option<String>

e-mail where notifications should originate from

§mail_notification_email: Option<String>

e-mail to send notifications to

§mail_notification_smtp: Option<String>

smtp server for e-mail notifications

§mail_notification_ssl_enabled: Option<bool>

True if smtp server requires SSL connection

§mail_notification_auth_enabled: Option<bool>

True if smtp server requires authentication

§mail_notification_username: Option<String>

Username for smtp authentication

§mail_notification_password: Option<String>

Password for smtp authentication

§autorun_enabled: Option<bool>

True if external program should be run after torrent has finished downloading

§autorun_program: Option<String>

Program path/name/arguments to run if autorun_enabled is enabled; path is separated by slashes; you can use %f and %n arguments, which will be expanded by qBittorent as path_to_torrent_file and torrent_name (from the GUI; not the .torrent file name) respectively

§queueing_enabled: Option<bool>

True if torrent queuing is enabled

§max_active_downloads: Option<i64>

Maximum number of active simultaneous downloads

§max_active_torrents: Option<i64>

Maximum number of active simultaneous downloads and uploads

§max_active_uploads: Option<i64>

Maximum number of active simultaneous uploads

§dont_count_slow_torrents: Option<bool>

If true torrents w/o any activity (stalled ones) will not be counted towards max_active_* limits; see dont_count_slow_torrents for more information

§slow_torrent_dl_rate_threshold: Option<i64>

Download rate in KiB/s for a torrent to be considered “slow”

§slow_torrent_ul_rate_threshold: Option<i64>

Upload rate in KiB/s for a torrent to be considered “slow”

§slow_torrent_inactive_timer: Option<i64>

Seconds a torrent should be inactive before considered “slow”

§max_ratio_enabled: Option<bool>

True if share ratio limit is enabled

§max_ratio: Option<f64>

Get the global share ratio limit

§max_ratio_act: Option<i64>

Action performed when a torrent reaches the maximum share ratio. See list of possible values here below.

§listen_port: Option<i64>

Port for incoming connections

§upnp: Option<bool>

True if UPnP/NAT-PMP is enabled

§random_port: Option<bool>

True if the port is randomly selected

§dl_limit: Option<i64>

Global download speed limit in KiB/s; -1 means no limit is applied

§up_limit: Option<i64>

Global upload speed limit in KiB/s; -1 means no limit is applied

§max_connec: Option<i64>

Maximum global number of simultaneous connections

§max_connec_per_torrent: Option<i64>

Maximum number of simultaneous connections per torrent

§max_uploads: Option<i64>

Maximum number of upload slots

§max_uploads_per_torrent: Option<i64>

Maximum number of upload slots per torrent

§stop_tracker_timeout: Option<i64>

Timeout in seconds for a stopped announce request to trackers

§enable_piece_extent_affinity: Option<bool>

True if the advanced libtorrent option piece_extent_affinity is enabled

§bittorrent_protocol: Option<i64>

Bittorrent Protocol to use (see list of possible values below)

§limit_utp_rate: Option<bool>

True if [du]l_limit should be applied to uTP connections; this option is only available in qBittorent built against libtorrent version 0.16.X and higher

§limit_tcp_overhead: Option<bool>

True if [du]l_limit should be applied to estimated TCP overhead (service data: e.g. packet headers)

§limit_lan_peers: Option<bool>

True if [du]l_limit should be applied to peers on the LAN

§alt_dl_limit: Option<i64>

Alternative global download speed limit in KiB/s

§alt_up_limit: Option<i64>

Alternative global upload speed limit in KiB/s

§scheduler_enabled: Option<bool>

True if alternative limits should be applied according to schedule

§schedule_from_hour: Option<i64>

Scheduler starting hour

§schedule_from_min: Option<i64>

Scheduler starting minute

§schedule_to_hour: Option<i64>

Scheduler ending hour

§schedule_to_min: Option<i64>

Scheduler ending minute

§scheduler_days: Option<i64>

Scheduler days. See possible values here below

§dht: Option<bool>

True if DHT is enabled

§pex: Option<bool>

True if PeX is enabled

§lsd: Option<bool>

True if LSD is enabled

§encryption: Option<i64>

See list of possible values here below

§anonymous_mode: Option<bool>

If true anonymous mode will be enabled; read more here; this option is only available in qBittorent built against libtorrent version 0.16.X and higher

§proxy_type: Option<IntOrStr>

In old versions (before 4.6.1 or early), this returns an interger. In newer versions, this returns a string.

§proxy_ip: Option<String>

Proxy IP address or domain name

§proxy_port: Option<i64>

Proxy port

§proxy_peer_connections: Option<bool>

True if peer and web seed connections should be proxified; this option will have any effect only in qBittorent built against libtorrent version 0.16.X and higher

§proxy_auth_enabled: Option<bool>

True proxy requires authentication; doesn’t apply to SOCKS4 proxies

§proxy_username: Option<String>

Username for proxy authentication

§proxy_password: Option<String>

Password for proxy authentication

§proxy_torrents_only: Option<bool>

True if proxy is only used for torrents

§ip_filter_enabled: Option<bool>

True if external IP filter should be enabled

§ip_filter_path: Option<String>

Path to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes

§ip_filter_trackers: Option<bool>

True if IP filters are applied to trackers

§web_ui_domain_list: Option<String>

Comma-separated list of domains to accept when performing Host header validation

§web_ui_address: Option<String>

IP address to use for the WebUI

§web_ui_port: Option<i64>

WebUI port

§web_ui_upnp: Option<bool>

True if UPnP is used for the WebUI port

§web_ui_username: Option<String>

WebUI username

§web_ui_password: Option<String>

For API ≥ v2.3.0: Plaintext WebUI password, not readable, write-only. For API < v2.3.0: MD5 hash of WebUI password, hash is generated from the following string: username:Web UI Access:plain_text_web_ui_password

§web_ui_csrf_protection_enabled: Option<bool>

True if WebUI CSRF protection is enabled

§web_ui_clickjacking_protection_enabled: Option<bool>

True if WebUI clickjacking protection is enabled

§web_ui_secure_cookie_enabled: Option<bool>

True if WebUI cookie Secure flag is enabled

§web_ui_max_auth_fail_count: Option<i64>

Maximum number of authentication failures before WebUI access ban

§web_ui_ban_duration: Option<i64>

WebUI access ban duration in seconds

§web_ui_session_timeout: Option<i64>

Seconds until WebUI is automatically signed off

§web_ui_host_header_validation_enabled: Option<bool>

True if WebUI host header validation is enabled

§bypass_local_auth: Option<bool>

True if authentication challenge for loopback address (127.0.0.1) should be disabled

§bypass_auth_subnet_whitelist_enabled: Option<bool>

True if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist

§bypass_auth_subnet_whitelist: Option<String>

(White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed; list entries are separated by commas

§alternative_webui_enabled: Option<bool>

True if an alternative WebUI should be used

§alternative_webui_path: Option<String>

File path to the alternative WebUI

§use_https: Option<bool>

True if WebUI HTTPS access is enabled

§ssl_key: Option<String>

For API < v2.0.1: SSL keyfile contents (this is a not a path)

§ssl_cert: Option<String>

For API < v2.0.1: SSL certificate contents (this is a not a path)

§web_ui_https_key_path: Option<String>

For API ≥ v2.0.1: Path to SSL keyfile

§web_ui_https_cert_path: Option<String>

For API ≥ v2.0.1: Path to SSL certificate

§dyndns_enabled: Option<bool>

True if server DNS should be updated dynamically

§dyndns_service: Option<i64>

See list of possible values here below

§dyndns_username: Option<String>

Username for DDNS service

§dyndns_password: Option<String>

Password for DDNS service

§dyndns_domain: Option<String>

Your DDNS domain name

§rss_refresh_interval: Option<i64>

RSS refresh interval

§rss_max_articles_per_feed: Option<i64>

Max stored articles per RSS feed

§rss_processing_enabled: Option<bool>

Enable processing of RSS feeds

§rss_auto_downloading_enabled: Option<bool>

Enable auto-downloading of torrents from the RSS feeds

§rss_download_repack_proper_episodes: Option<bool>

For API ≥ v2.5.1: Enable downloading of repack/proper Episodes

§rss_smart_episode_filters: Option<String>

For API ≥ v2.5.1: List of RSS Smart Episode Filters

§add_trackers_enabled: Option<bool>

Enable automatic adding of trackers to new torrents

§add_trackers: Option<String>

List of trackers to add to new torrent

§web_ui_use_custom_http_headers_enabled: Option<bool>

For API ≥ v2.5.1: Enable custom http headers

§web_ui_custom_http_headers: Option<String>

For API ≥ v2.5.1: List of custom http headers

§max_seeding_time_enabled: Option<bool>

True enables max seeding time

§max_seeding_time: Option<i64>

Number of minutes to seed a torrent

§announce_ip: Option<String>

TODO

§announce_to_all_tiers: Option<bool>

True always announce to all tiers

§announce_to_all_trackers: Option<bool>

True always announce to all trackers in a tier

§async_io_threads: Option<i64>

Number of asynchronous I/O threads

§banned_ips: Option<String>

List of banned IPs

§checking_memory_use: Option<i64>

Outstanding memory when checking torrents in MiB

§current_interface_address: Option<String>

IP Address to bind to. Empty String means All addresses

§current_network_interface: Option<String>

Network Interface used

§disk_cache: Option<i64>

Disk cache used in MiB

§disk_cache_ttl: Option<i64>

Disk cache expiry interval in seconds

§embedded_tracker_port: Option<i64>

Port used for embedded tracker

§enable_coalesce_read_write: Option<bool>

True enables coalesce reads & writes

§enable_embedded_tracker: Option<bool>

True enables embedded tracker

§enable_multi_connections_from_same_ip: Option<bool>

True allows multiple connections from the same IP address

§enable_os_cache: Option<bool>

True enables os cache

§enable_upload_suggestions: Option<bool>

True enables sending of upload piece suggestions

§file_pool_size: Option<i64>

File pool size

§outgoing_ports_max: Option<i64>

Maximal outgoing port (0: Disabled)

§outgoing_ports_min: Option<i64>

Minimal outgoing port (0: Disabled)

§recheck_completed_torrents: Option<bool>

True rechecks torrents on completion

§resolve_peer_countries: Option<bool>

True resolves peer countries

§save_resume_data_interval: Option<i64>

Save resume data interval in min

§send_buffer_low_watermark: Option<i64>

Send buffer low watermark in KiB

§send_buffer_watermark: Option<i64>

Send buffer watermark in KiB

§send_buffer_watermark_factor: Option<i64>

Send buffer watermark factor in percent

§socket_backlog_size: Option<i64>

Socket backlog size

§upload_choking_algorithm: Option<i64>

Upload choking algorithm used (see list of possible values below)

§upload_slots_behavior: Option<i64>

Upload slots behavior used (see list of possible values below)

§upnp_lease_duration: Option<i64>

UPnP lease duration (0: Permanent lease)

§utp_tcp_mixed_mode: Option<i64>

μTP-TCP mixed mode algorithm (see list of possible values below)

Implementations§

Source§

impl Preferences

Source

pub fn builder() -> PreferencesBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building Preferences. On the builder, call .locale(...)(optional), .create_subfolder_enabled(...)(optional), .start_paused_enabled(...)(optional), .auto_delete_mode(...)(optional), .preallocate_all(...)(optional), .incomplete_files_ext(...)(optional), .auto_tmm_enabled(...)(optional), .torrent_changed_tmm_enabled(...)(optional), .save_path_changed_tmm_enabled(...)(optional), .category_changed_tmm_enabled(...)(optional), .save_path(...)(optional), .temp_path_enabled(...)(optional), .temp_path(...)(optional), .scan_dirs(...)(optional), .export_dir(...)(optional), .export_dir_fin(...)(optional), .mail_notification_enabled(...)(optional), .mail_notification_sender(...)(optional), .mail_notification_email(...)(optional), .mail_notification_smtp(...)(optional), .mail_notification_ssl_enabled(...)(optional), .mail_notification_auth_enabled(...)(optional), .mail_notification_username(...)(optional), .mail_notification_password(...)(optional), .autorun_enabled(...)(optional), .autorun_program(...)(optional), .queueing_enabled(...)(optional), .max_active_downloads(...)(optional), .max_active_torrents(...)(optional), .max_active_uploads(...)(optional), .dont_count_slow_torrents(...)(optional), .slow_torrent_dl_rate_threshold(...)(optional), .slow_torrent_ul_rate_threshold(...)(optional), .slow_torrent_inactive_timer(...)(optional), .max_ratio_enabled(...)(optional), .max_ratio(...)(optional), .max_ratio_act(...)(optional), .listen_port(...)(optional), .upnp(...)(optional), .random_port(...)(optional), .dl_limit(...)(optional), .up_limit(...)(optional), .max_connec(...)(optional), .max_connec_per_torrent(...)(optional), .max_uploads(...)(optional), .max_uploads_per_torrent(...)(optional), .stop_tracker_timeout(...)(optional), .enable_piece_extent_affinity(...)(optional), .bittorrent_protocol(...)(optional), .limit_utp_rate(...)(optional), .limit_tcp_overhead(...)(optional), .limit_lan_peers(...)(optional), .alt_dl_limit(...)(optional), .alt_up_limit(...)(optional), .scheduler_enabled(...)(optional), .schedule_from_hour(...)(optional), .schedule_from_min(...)(optional), .schedule_to_hour(...)(optional), .schedule_to_min(...)(optional), .scheduler_days(...)(optional), .dht(...)(optional), .pex(...)(optional), .lsd(...)(optional), .encryption(...)(optional), .anonymous_mode(...)(optional), .proxy_type(...)(optional), .proxy_ip(...)(optional), .proxy_port(...)(optional), .proxy_peer_connections(...)(optional), .proxy_auth_enabled(...)(optional), .proxy_username(...)(optional), .proxy_password(...)(optional), .proxy_torrents_only(...)(optional), .ip_filter_enabled(...)(optional), .ip_filter_path(...)(optional), .ip_filter_trackers(...)(optional), .web_ui_domain_list(...)(optional), .web_ui_address(...)(optional), .web_ui_port(...)(optional), .web_ui_upnp(...)(optional), .web_ui_username(...)(optional), .web_ui_password(...)(optional), .web_ui_csrf_protection_enabled(...)(optional), .web_ui_clickjacking_protection_enabled(...)(optional), .web_ui_secure_cookie_enabled(...)(optional), .web_ui_max_auth_fail_count(...)(optional), .web_ui_ban_duration(...)(optional), .web_ui_session_timeout(...)(optional), .web_ui_host_header_validation_enabled(...)(optional), .bypass_local_auth(...)(optional), .bypass_auth_subnet_whitelist_enabled(...)(optional), .bypass_auth_subnet_whitelist(...)(optional), .alternative_webui_enabled(...)(optional), .alternative_webui_path(...)(optional), .use_https(...)(optional), .ssl_key(...)(optional), .ssl_cert(...)(optional), .web_ui_https_key_path(...)(optional), .web_ui_https_cert_path(...)(optional), .dyndns_enabled(...)(optional), .dyndns_service(...)(optional), .dyndns_username(...)(optional), .dyndns_password(...)(optional), .dyndns_domain(...)(optional), .rss_refresh_interval(...)(optional), .rss_max_articles_per_feed(...)(optional), .rss_processing_enabled(...)(optional), .rss_auto_downloading_enabled(...)(optional), .rss_download_repack_proper_episodes(...)(optional), .rss_smart_episode_filters(...)(optional), .add_trackers_enabled(...)(optional), .add_trackers(...)(optional), .web_ui_use_custom_http_headers_enabled(...)(optional), .web_ui_custom_http_headers(...)(optional), .max_seeding_time_enabled(...)(optional), .max_seeding_time(...)(optional), .announce_ip(...)(optional), .announce_to_all_tiers(...)(optional), .announce_to_all_trackers(...)(optional), .async_io_threads(...)(optional), .banned_ips(...)(optional), .checking_memory_use(...)(optional), .current_interface_address(...)(optional), .current_network_interface(...)(optional), .disk_cache(...)(optional), .disk_cache_ttl(...)(optional), .embedded_tracker_port(...)(optional), .enable_coalesce_read_write(...)(optional), .enable_embedded_tracker(...)(optional), .enable_multi_connections_from_same_ip(...)(optional), .enable_os_cache(...)(optional), .enable_upload_suggestions(...)(optional), .file_pool_size(...)(optional), .outgoing_ports_max(...)(optional), .outgoing_ports_min(...)(optional), .recheck_completed_torrents(...)(optional), .resolve_peer_countries(...)(optional), .save_resume_data_interval(...)(optional), .send_buffer_low_watermark(...)(optional), .send_buffer_watermark(...)(optional), .send_buffer_watermark_factor(...)(optional), .socket_backlog_size(...)(optional), .upload_choking_algorithm(...)(optional), .upload_slots_behavior(...)(optional), .upnp_lease_duration(...)(optional), .utp_tcp_mixed_mode(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Preferences.

Trait Implementations§

Source§

impl Clone for Preferences

Source§

fn clone(&self) -> Preferences

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Preferences

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Preferences

Source§

fn default() -> Preferences

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Preferences

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Preferences

Source§

fn eq(&self, other: &Preferences) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Preferences

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Preferences

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,