Struct gip::ProviderInfo[][src]

pub struct ProviderInfo {
    pub name: String,
    pub ptype: ProviderInfoType,
    pub format: ProviderInfoFormat,
    pub url: String,
    pub key: Vec<String>,
    pub padding: Option<String>,
}

Provider information

Fields

Provider name

Provider type

Provider format

URL for GET

Key for JSON format

Padding for JSON format

Methods

impl ProviderInfo
[src]

Provider information.

Examples

use gip::{ProviderInfo, ProviderInfoFormat, ProviderInfoType};
let p = ProviderInfo::new()
    .name("inet-ip.info")
    .ptype(ProviderInfoType::IPv4)
    .format(ProviderInfoFormat::Plane)
    .url("http://inet-ip.info/ip")
    .key(&vec![]);
println!("{:?}", p);

Create Provider from this info

Trait Implementations

impl Debug for ProviderInfo
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations