pub struct JitoClientBuilder { /* private fields */ }Expand description
Builder for configuring and creating a JitoClient.
Implementations§
Source§impl JitoClientBuilder
impl JitoClientBuilder
Sourcepub fn url<T: IntoIterator<Item = impl AsRef<str>>>(self, url: T) -> Self
pub fn url<T: IntoIterator<Item = impl AsRef<str>>>(self, url: T) -> Self
Sets the target URLs for the client.
Sourcepub fn interval(self, interval: Duration) -> Self
pub fn interval(self, interval: Duration) -> Self
Sets the interval duration between requests (0 = unlimited) For example, 5 requests per second = 200 ms interval.
Sourcepub fn ip<T: IntoIterator<Item = IpAddr>>(self, ip: T) -> Self
pub fn ip<T: IntoIterator<Item = IpAddr>>(self, ip: T) -> Self
Sets the local IP addresses to bind outgoing requests to.
Sourcepub fn error_read_headers(self, error_read_headers: bool) -> Self
pub fn error_read_headers(self, error_read_headers: bool) -> Self
Whether to include HTTP response headers in error messages when the request fails.
Sourcepub fn error_read_body(self, error_read_body: bool) -> Self
pub fn error_read_body(self, error_read_body: bool) -> Self
Whether to include HTTP response body in error messages when the request fails.
Sourcepub fn headers_with_separator(
self,
headers_with_separator: impl AsRef<str>,
) -> Self
pub fn headers_with_separator( self, headers_with_separator: impl AsRef<str>, ) -> Self
Sets custom headers encoded in the URL using a separator.
Example: .headers_with_separator(":").url(&["https://google.com:key1=value1&key2=value2"])
parses key1=value1&key2=value2 as headers.
Sourcepub fn build(self) -> Result<JitoClient>
pub fn build(self) -> Result<JitoClient>
Builds the JitoClient with the configured options.
Auto Trait Implementations§
impl !Freeze for JitoClientBuilder
impl !RefUnwindSafe for JitoClientBuilder
impl !UnwindSafe for JitoClientBuilder
impl Send for JitoClientBuilder
impl Sync for JitoClientBuilder
impl Unpin for JitoClientBuilder
impl UnsafeUnpin for JitoClientBuilder
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