Struct matrix_sdk::ClientConfig[][src]

pub struct ClientConfig { /* fields omitted */ }
Expand description

Configuration for the creation of the Client.

When setting the StateStore it is up to the user to open/connect the storage backend before client creation.

Example

// To pass all the request through mitmproxy set the proxy and disable SSL
// verification
let client_config = ClientConfig::new()
    .proxy("http://localhost:8080")
    .unwrap()
    .disable_ssl_verification();

Implementations

Create a new default ClientConfig.

Set the proxy through which all the HTTP requests should go.

Note, only HTTP proxies are supported.

Arguments

  • proxy - The HTTP URL of the proxy.

Example

use matrix_sdk::ClientConfig;

let client_config = ClientConfig::new()
    .proxy("http://localhost:8080")
    .unwrap();

Disable SSL verification for the HTTP requests.

Set a custom HTTP user agent for the client.

Set the path for storage.

Arguments

  • path - The path where the stores should save data in. It is the callers responsibility to make sure that the path exists.

In the default configuration the client will open default implementations for the crypto store and the state store. It will use the given path to open the stores. If no path is provided no store will be opened

Set the passphrase to encrypt the crypto store.

Argument

  • passphrase - The passphrase that will be used to encrypt the data in the cryptostore.

This is only used if no custom cryptostore is set.

Set the default timeout, fail and retry behavior for all HTTP requests.

Get the RequestConfig

Specify a client to handle sending requests and receiving responses.

Any type that implements the HttpSend trait can be used to send/receive http types.

Trait Implementations

Formats the value using the given formatter. Read more

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

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

Performs the conversion.

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

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

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.