pub struct HttpConfig {
pub connect_timeout_ms: u64,
pub pool_max_idle_per_host: usize,
pub pool_idle_timeout_ms: u64,
pub follow_redirects: bool,
pub response_timeout_ms: u64,
pub max_body_size: usize,
pub max_request_body: usize,
pub allow_private_ips: bool,
pub blocked_hosts: Vec<String>,
}Fields§
§connect_timeout_ms: u64§pool_max_idle_per_host: usize§pool_idle_timeout_ms: u64§follow_redirects: bool§response_timeout_ms: u64§max_body_size: usize§max_request_body: usize§allow_private_ips: bool§blocked_hosts: Vec<String>Implementations§
Source§impl HttpConfig
impl HttpConfig
pub fn with_connect_timeout_ms(self, ms: u64) -> Self
pub fn with_pool_max_idle_per_host(self, n: usize) -> Self
pub fn with_pool_idle_timeout_ms(self, ms: u64) -> Self
pub fn with_follow_redirects(self, follow: bool) -> Self
pub fn with_response_timeout_ms(self, ms: u64) -> Self
pub fn with_max_body_size(self, n: usize) -> Self
pub fn with_max_request_body(self, n: usize) -> Self
pub fn with_allow_private_ips(self, allow: bool) -> Self
pub fn with_blocked_hosts(self, hosts: Vec<String>) -> Self
Trait Implementations§
Source§impl Clone for HttpConfig
impl Clone for HttpConfig
Source§fn clone(&self) -> HttpConfig
fn clone(&self) -> HttpConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpConfig
impl Debug for HttpConfig
Source§impl Default for HttpConfig
impl Default for HttpConfig
Source§impl<'de> Deserialize<'de> for HttpConfig
impl<'de> Deserialize<'de> for HttpConfig
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 for HttpConfig
impl PartialEq for HttpConfig
impl StructuralPartialEq for HttpConfig
Auto Trait Implementations§
impl Freeze for HttpConfig
impl RefUnwindSafe for HttpConfig
impl Send for HttpConfig
impl Sync for HttpConfig
impl Unpin for HttpConfig
impl UnsafeUnpin for HttpConfig
impl UnwindSafe for HttpConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more