Struct mio_httpc::HttpcCfg

source ·
pub struct HttpcCfg {
    pub der_ca: Vec<Vec<u8>>,
    pub pem_ca: Vec<Vec<u8>>,
    pub cache_buffers: usize,
    pub dns_servers: Vec<SocketAddr>,
}
Expand description

Top level configuration for mio_http.

Fields

der_ca: Vec<Vec<u8>>

Extra root certificates in der format.

pem_ca: Vec<Vec<u8>>

Extra root certificates in pem format.

cache_buffers: usize

Default: 8

Max 8K buffers to keep cached for subsequent requests. Every request requires 2.

dns_servers: Vec<SocketAddr>

Set DNS servers if library can not easily get them from system (like Android). macOS, iOS and unix with /etc/resolv.conf are supported ATM. If none provided and library can’t get them, google DNS servers (8.8.8.8:53, 8.8.4.4:53) will be used.

Implementations

Will read pem files (extensions .crt or .pem) from path. Path can be to file or folder.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.