pub struct Config { /* private fields */ }
Expand description
Configuration for a stream transport connection.
Implementations§
source§impl Config
impl Config
sourcepub fn response_timeout(&self) -> Duration
pub fn response_timeout(&self) -> Duration
Returns the response timeout.
This is the amount of time to wait on a non-idle connection for a response to an outstanding request.
sourcepub fn set_response_timeout(&mut self, timeout: Duration)
pub fn set_response_timeout(&mut self, timeout: Duration)
Sets the response timeout.
For requests where ComposeRequest::is_streaming() returns true see set_streaming_response_timeout() instead.
Excessive values are quietly trimmed.
sourcepub fn streaming_response_timeout(&self) -> Duration
pub fn streaming_response_timeout(&self) -> Duration
Returns the streaming response timeout.
sourcepub fn set_streaming_response_timeout(&mut self, timeout: Duration)
pub fn set_streaming_response_timeout(&mut self, timeout: Duration)
Sets the streaming response timeout.
Only used for requests where ComposeRequest::is_streaming() returns true as it is typically desirable that such response streams be allowed to complete even if the individual responses arrive very slowly.
Excessive values are quietly trimmed.
sourcepub fn idle_timeout(&self) -> Duration
pub fn idle_timeout(&self) -> Duration
Returns the initial idle timeout, if set.
sourcepub fn set_idle_timeout(&mut self, timeout: Duration)
pub fn set_idle_timeout(&mut self, timeout: Duration)
Sets the initial idle timeout.
By default the stream is immediately closed if there are no pending requests or responses.
Set this to allow requests to be sent in sequence with delays between such as a SOA query followed by AXFR for more efficient use of the stream per RFC 9103.
Note: May be overridden by an RFC 7828 edns-tcp-keepalive timeout received from a server.
Excessive values are quietly trimmed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)