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 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 store::ThreadSubscriptionCatchupToken;
- pub use http;- testing
- pub use matrix_sdk_crypto as crypto;- e2e-encryption
- pub 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.
- serde_helpers 
- A collection of serde helpers to avoid having to deserialize an entire event to access some fields.
- 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.
- stream
- Platform-specific stream utilities.
- 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 on Drophow long its covered section took to execute.
Structs§
- BaseClient 
- A no (network) IO client implementation.
- InviteAcceptance Details 
- A struct remembering details of an invite and if the invite has been accepted on this particular client.
- OriginalMinimal State Event 
- An unredacted minimal state event.
- PredecessorRoom 
- When a room A is tombstoned, it is replaced by a room B. The room A is the
predecessor of B, and B is the successor of A. This type holds information
about the predecessor room. See Room::predecessor_room.
- RedactedMinimal State Event 
- A redacted minimal state event.
- RequestedRequired States 
- Represent the required_statevalues sent by a sync request.
- Room
- The underlying room data structure collecting state for joined, left and invited rooms.
- RoomCreate With Creator Event Content 
- The content of an m.room.createevent, with a requiredcreatorfield.
- RoomHero 
- Information about a member considered to be a room hero.
- RoomInfo 
- The underlying pure data structure for joined and left rooms.
- RoomInfo Notable Update 
- Indicates that a notable update of RoomInfohas been applied, and why.
- RoomInfo Notable Update Reasons 
- The reason why a RoomInfoNotableUpdateis emitted.
- RoomMember 
- A member of a room.
- RoomMemberships 
- Room membership filter as a bitset.
- RoomState Filter 
- Room state filter as a bitset.
- SessionMeta 
- The Matrix user session info.
- SuccessorRoom 
- When a room A is tombstoned, it is replaced by a room B. The room A is the
predecessor of B, and B is the successor of A. This type holds information
about the successor room. See Room::successor_room.
Enums§
- EncryptionState 
- Represents the state of a room encryption.
- Error
- Internal representation of errors.
- MinimalState Event 
- A minimal state event.
- RoomDisplay Name 
- The name of the room, either from the metadata or calculated according to matrix specification
- RoomMembers Update 
- The kind of room member updates that just happened.
- RoomState 
- Enum keeping track in which state the room is, e.g. if our own user is joined, RoomState::Invited, or has left the room.
- ThreadingSupport 
- Whether this client instance supports threading or not. Currently used to determine how the client handles read receipts and unread count computations on the base SDK level.
Constants§
- LEASE_DURATION_ MS 
- Amount of time a lease of the lock should last, in milliseconds.
- ROOM_VERSION_ FALLBACK 
- The room version to use as a fallback when the version of a room is unknown.
- ROOM_VERSION_ RULES_ FALLBACK 
- The room version rules to use as a fallback when the version of a room is unknown or unsupported.
Traits§
- AsyncTrait 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.
- SendOutside Wasm 
- Alias for Sendon non-wasm, empty trait (implemented by everything) on wasm.
- SyncOutside 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
- MinimalRoom Member Event 
- A minimal m.room.memberevent.
- Result
- Result type of the rust-sdk.