pub struct HttpTransportClientBuilder<L> { /* private fields */ }
Expand description
Builder for HttpTransportClient
.
Implementations§
source§impl HttpTransportClientBuilder<Identity>
impl HttpTransportClientBuilder<Identity>
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new HttpTransportClientBuilder
.
source§impl<L> HttpTransportClientBuilder<L>
impl<L> HttpTransportClientBuilder<L>
sourcepub fn set_certification_store(self, cert_store: CertificateStore) -> Self
pub fn set_certification_store(self, cert_store: CertificateStore) -> Self
Set the certificate store.
sourcepub fn max_request_size(self, size: u32) -> Self
pub fn max_request_size(self, size: u32) -> Self
Set the maximum size of a request body in bytes. Default is 10 MiB.
sourcepub fn max_response_size(self, size: u32) -> Self
pub fn max_response_size(self, size: u32) -> Self
Set the maximum size of a response in bytes. Default is 10 MiB.
sourcepub fn set_headers(self, headers: HeaderMap) -> Self
pub fn set_headers(self, headers: HeaderMap) -> Self
Set a custom header passed to the server with every request (default is none).
The caller is responsible for checking that the headers do not conflict or are duplicated.
sourcepub fn set_tcp_no_delay(self, no_delay: bool) -> Self
pub fn set_tcp_no_delay(self, no_delay: bool) -> Self
Configure TCP_NODELAY
on the socket to the supplied value nodelay
.
Default is true
.
sourcepub fn set_max_logging_length(self, max: u32) -> Self
pub fn set_max_logging_length(self, max: u32) -> Self
Max length for logging for requests and responses in number characters.
Logs bigger than this limit will be truncated.
sourcepub fn set_service<T>(
self,
service: ServiceBuilder<T>,
) -> HttpTransportClientBuilder<T>
pub fn set_service<T>( self, service: ServiceBuilder<T>, ) -> HttpTransportClientBuilder<T>
Configure a tower service.
sourcepub fn build<S, B>(
self,
target: impl AsRef<str>,
) -> Result<HttpTransportClient<S>, Error>
pub fn build<S, B>( self, target: impl AsRef<str>, ) -> Result<HttpTransportClient<S>, Error>
Build a HttpTransportClient
.
Trait Implementations§
source§impl<L: Debug> Debug for HttpTransportClientBuilder<L>
impl<L: Debug> Debug for HttpTransportClientBuilder<L>
Auto Trait Implementations§
impl<L> Freeze for HttpTransportClientBuilder<L>where
L: Freeze,
impl<L> RefUnwindSafe for HttpTransportClientBuilder<L>where
L: RefUnwindSafe,
impl<L> Send for HttpTransportClientBuilder<L>where
L: Send,
impl<L> Sync for HttpTransportClientBuilder<L>where
L: Sync,
impl<L> Unpin for HttpTransportClientBuilder<L>where
L: Unpin,
impl<L> UnwindSafe for HttpTransportClientBuilder<L>where
L: UnwindSafe,
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