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;testingpub use matrix_sdk_crypto as crypto;e2e-encryptionpub use once_cell;
Modules§
- debug
- Helpers for creating
std::fmt::Debugimplementations. - 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
Resultwhen 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
BaseClientwith 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
/syncrequest. - 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
EventCacheStoreimplementation 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
EventCacheStoreMediaimplementation 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
tracingevent once it’s dropped.
Structs§
- Base
Client - A no (network) IO client implementation.
- Original
Minimal State Event - An unredacted minimal state event.
- Redacted
Minimal State Event - A redacted minimal state event.
- Requested
Required States - Represent the
required_statevalues sent by a sync request. - 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.createevent, with a requiredcreatorfield. - 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
RoomInfohas been applied, and why. - Room
Info Notable Update Reasons - The reason why a
RoomInfoNotableUpdateis 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§
- Encryption
State - Represents the state of a room encryption.
- 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
SendandSyncto have implemented, while other targets will. - Send
Outside Wasm - Alias for
Sendon non-wasm, empty trait (implemented by everything) on wasm. - Sync
Outside Wasm - Alias for
Syncon 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
- Minimal
Room Member Event - A minimal
m.room.memberevent. - Result
- Result type of the rust-sdk.