pub struct ClientBuilder { /* private fields */ }Expand description
Builder for configuring and creating a client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new(server_addr: SocketAddr) -> Self
pub fn new(server_addr: SocketAddr) -> Self
Creates a new client builder for the specified server address.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the connection timeout.
Sourcepub fn reconnect_delay(self, delay: Duration) -> Self
pub fn reconnect_delay(self, delay: Duration) -> Self
Sets the reconnection delay.
Sourcepub fn max_reconnect_attempts(self, max: usize) -> Self
pub fn max_reconnect_attempts(self, max: usize) -> Self
Sets the maximum reconnection attempts.
Sourcepub fn channel_capacity(self, capacity: usize) -> Self
pub fn channel_capacity(self, capacity: usize) -> Self
Sets the channel capacity.
Sourcepub fn build(self) -> (Client, ClientHandle)
pub fn build(self) -> (Client, ClientHandle)
Builds the client and handle.
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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