pub struct Configuration {Show 16 fields
pub log_level: Option<String>,
pub mode: TrackerMode,
pub db_driver: DatabaseDriver,
pub db_path: String,
pub announce_interval: u32,
pub min_announce_interval: u32,
pub max_peer_timeout: u32,
pub on_reverse_proxy: bool,
pub external_ip: Option<String>,
pub tracker_usage_statistics: bool,
pub persistent_torrent_completed_stat: bool,
pub inactive_peer_cleanup_interval: u64,
pub remove_peerless_torrents: bool,
pub udp_trackers: Vec<UdpTracker>,
pub http_trackers: Vec<HttpTracker>,
pub http_api: HttpApi,
}Fields§
§log_level: Option<String>§mode: TrackerMode§db_driver: DatabaseDriver§db_path: String§announce_interval: u32§min_announce_interval: u32§max_peer_timeout: u32§on_reverse_proxy: bool§external_ip: Option<String>§tracker_usage_statistics: bool§persistent_torrent_completed_stat: bool§inactive_peer_cleanup_interval: u64§remove_peerless_torrents: bool§udp_trackers: Vec<UdpTracker>§http_trackers: Vec<HttpTracker>§http_api: HttpApiImplementations§
source§impl Configuration
impl Configuration
pub fn get_ext_ip(&self) -> Option<IpAddr>
sourcepub fn load_from_file(path: &str) -> Result<Configuration, Error>
pub fn load_from_file(path: &str) -> Result<Configuration, Error>
Errors
Will return Err if path does not exist or has a bad configuration.
sourcepub fn load_from_env_var(
config_env_var_name: &str
) -> Result<Configuration, Error>
pub fn load_from_env_var( config_env_var_name: &str ) -> Result<Configuration, Error>
Errors
Will return Err if the environment variable does not exist or has a bad configuration.
Trait Implementations§
source§impl Debug for Configuration
impl Debug for Configuration
source§impl Default for Configuration
impl Default for Configuration
source§impl<'de> Deserialize<'de> for Configuration
impl<'de> Deserialize<'de> for Configuration
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<Configuration> for Configuration
impl PartialEq<Configuration> for Configuration
source§fn eq(&self, other: &Configuration) -> bool
fn eq(&self, other: &Configuration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.