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 rate(self, rate: u64) -> Self
pub fn rate(self, rate: u64) -> Self
Sets the request rate limit (requests per second, 0 = unlimited).
Sourcepub fn multi_ipv4(self, mutil_ip: bool) -> Self
pub fn multi_ipv4(self, mutil_ip: bool) -> Self
Enables sending requests via multiple IPv4 addresses.
Sourcepub fn multi_ipv6(self, mutil_ip: bool) -> Self
pub fn multi_ipv6(self, mutil_ip: bool) -> Self
Enables sending requests via multiple IPv6 addresses.
Sourcepub fn multi_ip(self, mutil_ip: bool) -> Self
pub fn multi_ip(self, mutil_ip: bool) -> Self
Enables sending requests via multiple IPs (both IPv4 and IPv6).
Sourcepub fn with_ip(self, ip: Vec<IpAddr>) -> Self
pub fn with_ip(self, ip: Vec<IpAddr>) -> Self
Sets the local IP addresses to bind outgoing requests to.
Sourcepub fn broadcast(self, broadcast: bool) -> Self
pub fn broadcast(self, broadcast: bool) -> Self
Configures the client to send requests to all URLs in parallel.
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 Send for JitoClientBuilder
impl Sync for JitoClientBuilder
impl Unpin for JitoClientBuilder
impl !UnwindSafe 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