Expand description
This crate implements the base to build a Matrix client library.
§Crate Feature Flags
The following crate feature flags are available:
encryption
: Enables end-to-end encryption support in the library.qrcode
: Enables QRcode generation and reading code.testing
: Provides facilities and functions for tests, in particular for integration testing store implementations. ATTENTION: do not ever use outside of tests, we do not provide any stability warantees on these, these are merely helpers. If you find you need any function provided here outside of tests, please open a Github Issue and inform us about your use case for us to consider.
Re-exports§
pub use read_receipts::PreviousEventsProvider;
pub use store::ComposerDraft;
pub use store::ComposerDraftType;
pub use store::QueueWedgeError;
pub use store::StateChanges;
pub use store::StateStore;
pub use store::StateStoreDataKey;
pub use store::StateStoreDataValue;
pub use store::StoreError;
pub use http;
testing
pub use matrix_sdk_crypto as crypto;
e2e-encryption
pub use once_cell;
Modules§
- debug
- Helpers for creating
std::fmt::Debug
implementations. - deserialized_
responses - SDK-specific variations of response types from Ruma.
- event_
cache - Event cache store and common types shared with
matrix_sdk::event_cache
. - executor
- Abstraction over an executor so we can spawn tasks under WASM the same way we do usually.
- failures_
cache - A TTL cache which can be used to time out repeated operations that might experience intermittent failures.
- latest_
event - Utilities for working with events to decide whether they are suitable for use as a crate::Room::latest_event.
- linked_
chunk - A linked chunk is the underlying data structure that holds all events.
- locks
- Simplified locks hat panic instead of returning a
Result
when the lock is poisoned. - media
- Common types for media content.
- notification_
settings - Some shared types about notification settings.
- read_
receipts - Client-side read receipts computation
- ring_
buffer - ruma
- Types and traits for working with the Matrix protocol.
- sleep
- sliding_
sync - Extend
BaseClient
with capabilities to handle MSC4186. - store
- The state store holds the overall state for rooms, users and their
profiles and their timelines. It is an overall cache for faster access
and convenience- accessible through
Store
. - store_
locks - Collection of small helpers that implement store-based locks.
- sync
- The SDK’s representation of the result of a
/sync
request. - timeout
- tracing_
timer - ttl_
cache - A TTL cache which can be used to time out repeated operations that might experience intermittent failures.
Macros§
- boxed_
into_ future - event_
cache_ store_ integration_ tests testing
- Macro building to allow your
EventCacheStore
implementation to run the entire tests suite locally. - event_
cache_ store_ integration_ tests_ time testing
- Macro generating tests for the event cache store, related to time (mostly for the cross-process lock).
- event_
cache_ store_ media_ integration_ tests testing
- Macro building to allow your
EventCacheStoreMedia
implementation to run the entire tests suite locally. - statestore_
integration_ tests testing
- Macro building to allow your StateStore implementation to run the entire tests suite locally.
- timer
- Macro to create a RAII timer that will log a
tracing
event once it’s dropped.
Structs§
- Base
Client - A no IO Client implementation.
- Original
Minimal State Event - An unredacted minimal state event.
- Redacted
Minimal State Event - A redacted minimal state event.
- Room
- The underlying room data structure collecting state for joined, left and invited rooms.
- Room
Create With Creator Event Content - The content of an
m.room.create
event, with a requiredcreator
field. - Room
Hero - Information about a member considered to be a room hero.
- Room
Info - The underlying pure data structure for joined and left rooms.
- Room
Info Notable Update - Indicates that a notable update of
RoomInfo
has been applied, and why. - Room
Info Notable Update Reasons - The reason why a
RoomInfoNotableUpdate
is emitted. - Room
Member - A member of a room.
- Room
Memberships - Room membership filter as a bitset.
- Room
State Filter - Room state filter as a bitset.
- Session
Meta - The Matrix user session info.
Enums§
- Error
- Internal representation of errors.
- Minimal
State Event - A minimal state event.
- Room
Display Name - The name of the room, either from the metadata or calculated according to matrix specification
- Room
Members Update - The kind of room member updates that just happened.
- Room
State - Enum keeping track in which state the room is, e.g. if our own user is joined, RoomState::Invited, or has left the room.
Constants§
- LEASE_
DURATION_ MS - Amount of time a lease of the lock should last, in milliseconds.
Traits§
- Async
Trait Deps - Super trait that is used for our store traits, this trait will differ if
it’s used on WASM. WASM targets will not require
Send
andSync
to have implemented, while other targets will. - Send
Outside Wasm Non-WebAssembly - Alias for
Send
on non-wasm, empty trait (implemented by everything) on wasm. - Sync
Outside Wasm Non-WebAssembly - Alias for
Sync
on non-wasm, empty trait (implemented by everything) on wasm.
Functions§
- apply_
redaction - Apply a redaction to the given target
event
, given the raw redaction event and the room version.
Type Aliases§
- BoxFuture
Non-WebAssembly - Minimal
Room Member Event - A minimal
m.room.member
event. - Result
- Result type of the rust-sdk.