Struct distant_net::client::ClientBuilder
source · pub struct ClientBuilder<H, C> { /* private fields */ }Expand description
Builder for a Client or UntypedClient.
Implementations§
source§impl<H, C> ClientBuilder<H, C>
impl<H, C> ClientBuilder<H, C>
sourcepub fn auth_handler<U>(self, auth_handler: U) -> ClientBuilder<U, C>
pub fn auth_handler<U>(self, auth_handler: U) -> ClientBuilder<U, C>
Configure the authentication handler to use when connecting to a server.
sourcepub fn config(self, config: ClientConfig) -> Self
pub fn config(self, config: ClientConfig) -> Self
Configure the client-local configuration details.
sourcepub fn connector<U>(self, connector: U) -> ClientBuilder<H, U>
pub fn connector<U>(self, connector: U) -> ClientBuilder<H, U>
Configure the connector to use to facilitate connecting to a server.
sourcepub fn connect_timeout(
self,
connect_timeout: impl Into<Option<Duration>>
) -> Self
pub fn connect_timeout( self, connect_timeout: impl Into<Option<Duration>> ) -> Self
Configure a maximum duration to wait for a connection to a server to complete.
source§impl<H, C> ClientBuilder<H, C>where
H: AuthHandler + Send,
C: Connector,
impl<H, C> ClientBuilder<H, C>where H: AuthHandler + Send, C: Connector,
sourcepub async fn connect_untyped(self) -> Result<UntypedClient>
pub async fn connect_untyped(self) -> Result<UntypedClient>
Establishes a connection with a remote server using the configured Transport
and other settings, returning a new UntypedClient instance once the connection
is fully established and authenticated.
Trait Implementations§
Auto Trait Implementations§
impl<H, C> RefUnwindSafe for ClientBuilder<H, C>where C: RefUnwindSafe, H: RefUnwindSafe,
impl<H, C> Send for ClientBuilder<H, C>where C: Send, H: Send,
impl<H, C> Sync for ClientBuilder<H, C>where C: Sync, H: Sync,
impl<H, C> Unpin for ClientBuilder<H, C>where C: Unpin, H: Unpin,
impl<H, C> UnwindSafe for ClientBuilder<H, C>where C: UnwindSafe, H: UnwindSafe,
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