Struct ruma_client::Client

source ·
pub struct Client<C: Connect>(_);
Expand description

A client for the Matrix client-server API.

Implementations

Creates a new client for making HTTP requests to the given homeserver.

Creates a new client for making HTTPS requests to the given homeserver.

Creates a new client using the given hyper::Client.

This allows the user to configure the details of HTTP as desired.

Log in with a username and password.

In contrast to api::r0::session::login::call(), this method stores the session data returned by the endpoint in this client, instead of returning it.

Register as a guest. In contrast to api::r0::account::register::call(), this method stores the session data returned by the endpoint in this client, instead of returning it.

Register as a new user on this server.

In contrast to api::r0::account::register::call(), this method stores the session data returned by the endpoint in this client, instead of returning it.

The username is the local part of the returned user_id. If it is omitted from this request, the server will generate one.

Convenience method that represents repeated calls to the sync_events endpoint as a stream.

If the since parameter is None, the first Item might take a significant time to arrive and be deserialized, because it contains all events that have occured in the whole lifetime of the logged-in users account and are visible to them.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.