pub struct ClientBuilder<H, C> { /* private fields */ }
Expand description

Builder for a Client or UntypedClient.

Implementations§

source§

impl<H, C> ClientBuilder<H, C>

source

pub fn auth_handler<U>(self, auth_handler: U) -> ClientBuilder<U, C>

Configure the authentication handler to use when connecting to a server.

source

pub fn config(self, config: ClientConfig) -> Self

Configure the client-local configuration details.

source

pub fn connector<U>(self, connector: U) -> ClientBuilder<H, U>

Configure the connector to use to facilitate connecting to a server.

source

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 ClientBuilder<(), ()>

source

pub fn new() -> Self

source§

impl<H, C> ClientBuilder<H, C>where H: AuthHandler + Send, C: Connector,

source

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.

source

pub async fn connect<T, U>(self) -> Result<Client<T, U>>

Establishes a connection with a remote server using the configured Transport and other settings, returning a new Client instance once the connection is fully established and authenticated.

Trait Implementations§

source§

impl Default for ClientBuilder<(), ()>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsAny for Twhere T: 'static,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts reference to Any
source§

fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)

Converts mutable reference to Any
source§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Consumes and produces Box<dyn Any>
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V