pub struct LocalClientBuilder<T: LocalTransport> { /* private fields */ }Expand description
Builder for LocalClient.
Single-threaded counterpart of crate::ClientBuilder; the type
parameter T selects a LocalTransport backend rather than the
multi-threaded Transport family.
Implementations§
Source§impl<T: LocalTransport> LocalClientBuilder<T>
impl<T: LocalTransport> LocalClientBuilder<T>
Sourcepub fn new(server_addr: SocketAddr) -> Self
pub fn new(server_addr: SocketAddr) -> Self
Creates a new local client builder targeting server_addr.
Sourcepub fn connect_config(self, config: T::ConnectConfig) -> Self
pub fn connect_config(self, config: T::ConnectConfig) -> Self
Supplies a backend-specific connect configuration.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the outer connect timeout used by the reconnect loop.
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 cmd/event channel capacity.
Sourcepub fn build(self) -> (LocalClient<T>, ClientHandle)
pub fn build(self) -> (LocalClient<T>, ClientHandle)
Builds the client and its external handle.
Auto Trait Implementations§
impl<T> Freeze for LocalClientBuilder<T>
impl<T> RefUnwindSafe for LocalClientBuilder<T>
impl<T> Send for LocalClientBuilder<T>
impl<T> Sync for LocalClientBuilder<T>
impl<T> Unpin for LocalClientBuilder<T>
impl<T> UnsafeUnpin for LocalClientBuilder<T>
impl<T> UnwindSafe for LocalClientBuilder<T>
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