pub struct ClientConfigBuilder { /* private fields */ }Expand description
Builder for client configuration.
Implementations§
Source§impl ClientConfigBuilder
impl ClientConfigBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new builder initialized with ClientConfig::default.
Sourcepub fn user_name(self, name: impl Into<String>) -> Self
pub fn user_name(self, name: impl Into<String>) -> Self
Set the display name advertised to other collaborators.
Sourcepub fn auto_reconnect(self, enabled: bool) -> Self
pub fn auto_reconnect(self, enabled: bool) -> Self
Enable or disable automatic reconnection attempts.
Sourcepub fn max_reconnect_attempts(self, attempts: u32) -> Self
pub fn max_reconnect_attempts(self, attempts: u32) -> Self
Set the maximum number of reconnect attempts.
Sourcepub fn build(self) -> ClientConfig
pub fn build(self) -> ClientConfig
Build and return the final ClientConfig.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientConfigBuilder
impl RefUnwindSafe for ClientConfigBuilder
impl Send for ClientConfigBuilder
impl Sync for ClientConfigBuilder
impl Unpin for ClientConfigBuilder
impl UnsafeUnpin for ClientConfigBuilder
impl UnwindSafe for ClientConfigBuilder
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