[−][src]Trait yukikaze::client::config::Config
Generic config trait.
Each method describes single aspect of configuration and provided with sane defaults
Associated Types
Loading content...Required methods
fn new_connector() -> Self::Connector
Creates new connector and returns its instance.
Provided methods
fn decompress() -> bool
Specifies whether to automatically request compressed response.
Defaults to true.
fn timeout() -> Duration
Specifies request timeout.
Default is 30 seconds
Zero duration means infinite
fn default_headers(request: &mut Request)
Allows to sets default headers before request is sent out
It is called as soon as request is being sent out,
but before Accept-Encoding
is set.
By default it sets following, if not present:
- Yukikaze-sama's user-agent
HOST
header with host, and optionally port, taken from URI.
fn max_redirect_num() -> usize
Returns max number of redirects
By default it is 8.
fn config_hyper(builder: &mut Builder) -> &mut Builder
Allows to hook hyper's Client configuration.
By default it uses hyper's defaults
Implementors
impl Config for DefaultCfg
[src]
type Connector = DefaultConnector
type Timer = DefaultTimer
fn new_connector() -> Self::Connector
[src]
Creates new connector and returns its instance.
Uses 4 threads by default.