pub struct ClientBuilder {
pub max_redirections: Option<usize>,
pub connect_timeout: Option<Duration>,
}
Available on crate feature
http-api
only.Expand description
The builder of Client
.
Fields
max_redirections: Option<usize>
Max number of redirections to follow.
connect_timeout: Option<Duration>
Connect timeout for the request.
Implementations
sourceimpl ClientBuilder
impl ClientBuilder
sourcepub fn max_redirections(self, max_redirections: usize) -> Self
pub fn max_redirections(self, max_redirections: usize) -> Self
Sets the maximum number of redirections.
sourcepub fn connect_timeout(self, connect_timeout: Duration) -> Self
pub fn connect_timeout(self, connect_timeout: Duration) -> Self
Sets the connection timeout.
Trait Implementations
sourceimpl Clone for ClientBuilder
impl Clone for ClientBuilder
sourcefn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientBuilder
impl Debug for ClientBuilder
sourceimpl Default for ClientBuilder
impl Default for ClientBuilder
sourcefn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ClientBuilder
impl<'de> Deserialize<'de> for ClientBuilder
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'de, D, R> CommandArg<'de, R> for D where
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for D where
D: Deserialize<'de>,
R: Runtime,
sourcefn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
Derives an instance of Self
from the CommandItem
. Read more