Struct gip::ProviderAny
[−]
[src]
pub struct ProviderAny { pub providers: Vec<Box<Provider>>, pub ptype: ProviderType, }
Provider for checking global address from multiple providers
Fields
providers: Vec<Box<Provider>>
Providers for checking global address
ptype: ProviderType
Provider type
Methods
impl ProviderAny
[src]
pub fn new() -> Self
[src]
pub fn from_toml(s: &str) -> Result<Self>
[src]
Load providers from TOML string
Trait Implementations
impl Provider for ProviderAny
[src]
fn get_addr(&mut self) -> Result<GlobalAddress>
[src]
Get global IP address
fn get_name(&self) -> String
[src]
Get provider name
fn get_type(&self) -> ProviderType
[src]
Get provider type
fn set_timeout(&mut self, timeout: usize)
[src]
Set timeout by milliseconds
fn set_proxy(&mut self, host: &str, port: u16)
[src]
Set proxy