logo
pub struct ClientBuilder { /* private fields */ }
Available on crate feature client-api only.
Expand description

A Client builder.

This type can be used to construct a Client through a few method calls.

Implementations

Set the homeserver URL.

The homeserver URL must be set before calling build() or http_client().

Set the access token.

Set the supported Matrix versions.

This method generally shouldn’t be called. The build() or http_client() method will take care of doing a get_supported_versions request to find out about the supported versions.

Finish building the Client.

Uses DefaultConstructibleHttpClient::default() to create an HTTP client instance. Unless the supported Matrix versions were manually set via supported_matrix_versions, this will do a get_supported_versions request to find out about the supported versions.

Set the HTTP client to finish building the Client.

Unless the supported Matrix versions were manually set via supported_matrix_versions, this will do a get_supported_versions request to find out about the supported versions.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more