logo
pub struct ClientBuilder { /* private fields */ }
Expand description

A Client builder.

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

Implementations

Available on crate feature client-api only.

Set the homeserver URL.

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

Available on crate feature client-api only.

Set the access token.

Available on crate feature client-api only.

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.

Available on crate feature client-api only.

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.

Available on crate feature client-api only.

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