| 1 | //! A compact application backend contract on top of the Matrix Rust SDK. |
| 2 | |
| 3 | mod encryption; |
| 4 | mod engine; |
| 5 | mod error; |
| 6 | mod mentions; |
| 7 | mod mentions_model; |
| 8 | #[cfg(feature = "mirror")] |
| 9 | mod mirror; |
| 10 | mod model; |
| 11 | mod normalise; |
| 12 | mod repair_model; |
| 13 | mod search; |
| 14 | mod search_model; |
| 15 | mod space_order; |
| 16 | mod transport; |
| 17 | mod uiaa; |
| 18 | mod upload; |
| 19 | #[cfg(target_family = "wasm")] |
| 20 | mod wasm; |
| 21 | |
| 22 | #[cfg(all(feature = "sqlite", target_family = "wasm"))] |
| 23 | compile_error!("sqlite has no filesystem to live on in wasm, use indexeddb"); |
| 24 | #[cfg(all(feature = "indexeddb", not(target_family = "wasm")))] |
| 25 | compile_error!("indexeddb only exists in a browser, use sqlite"); |
| 26 | |
| 27 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 28 | mod account; |
| 29 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 30 | mod accounts; |
| 31 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 32 | mod session_store; |
| 33 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 34 | mod store_lock; |
| 35 | |
| 36 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 37 | pub use account::{ |
| 38 | AccountError, OAuthApplicationType, OAuthLogin, PasswordLogin, PendingOAuthLogin, Restore, |
| 39 | Session, SessionRecord, SoftLogout, StoreConfig, UnsavedSession, |
| 40 | }; |
| 41 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 42 | pub use accounts::{Account, Accounts}; |
| 43 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 44 | pub use session_store::{EncryptedSessionStore, SessionStore}; |
| 45 | |
| 46 | pub use engine::{Engine, EngineConfig, EngineError}; |
| 47 | pub use error::{Error, ErrorKind, ServerError}; |
| 48 | pub use imbl; |
| 49 | pub use mentions_model::{ |
| 50 | MentionCaptureState, MentionCoverage, MentionEntry, MentionGap, MentionGapReason, MentionKey, |
| 51 | MentionReason, MentionsBoundary, MentionsCommand, MentionsPage, MentionsUpdate, |
| 52 | SavedMentionContext, |
| 53 | }; |
| 54 | #[cfg(feature = "mirror")] |
| 55 | pub use mirror::{ |
| 56 | Mirror, MirrorHandle, SessionStatus, State, StateChange, Subscription, ThreadListChange, |
| 57 | ThreadListState, TimelineChange, TimelineState, Update, UploadFailure, UploadState, |
| 58 | }; |
| 59 | pub use model::{ |
| 60 | AccountCommand, AttachmentEncryption, AttachmentUpload, Change, Command, CommandOutput, |
| 61 | ConnectionState, CreateRoomOptions, EncryptionCommand, EncryptionState, EngineErrorKind, |
| 62 | EngineFailure, Event, EventContext, EventContextCloseReason, EventContextCommand, |
| 63 | EventContextPage, EventContextSession, EventRef, HistoryState, ImagePack, ImagePackSource, |
| 64 | ImagePacks, KeyBackupState, LatestEvent, LifecycleCommand, LinkPreview, LinkPreviewImage, |
| 65 | Media, MediaCommand, MediaDescriptor, MediaFile, MediaId, MediaKind, MediaLocation, MediaSize, |
| 66 | MemberFilter, MemberMembership, MemberSummary, MembershipChange, Message, MessageContent, |
| 67 | MessageEditContent, MessageKind, MessageMentions, NotificationCommand, OwnDevice, PackCommand, |
| 68 | PackImage, PackImageInfo, PackUsage, Patch, PowerLevelChanges, Profile, PushNotification, |
| 69 | PushNotificationEvent, PushNotificationRoom, PushNotificationSender, PushNotificationStatus, |
| 70 | Reaction, RecentHistoryState, RecoveryKey, RecoveryState, ReplyDetails, ReplyReference, Retain, |
| 71 | RichText, RoomCategory, RoomCommand, RoomHero, RoomListFilter, RoomMatcher, RoomMembership, |
| 72 | RoomNotificationMode, RoomNotificationSettings, RoomPowerLevels, RoomPreset, RoomSummary, |
| 73 | RoomVisibility, SendState, Sender, SpaceChild, Termination, ThreadListCloseReason, |
| 74 | ThreadListCommand, ThreadListEntry, ThreadSummary, ThreadUnread, TimelineCommand, |
| 75 | TimelineContent, TimelineDiff, TimelineDiffError, TimelineEvent, TimelineId, TimelineItem, |
| 76 | TimelineItemId, TypingState, UploadDetails, UploadOutcome, UploadThumbnail, UtdCause, |
| 77 | VerificationAction, VerificationFailure, VerificationState, VerificationTarget, |
| 78 | }; |
| 79 | pub use repair_model::{ |
| 80 | HistoryContinuity, HistoryGap, HistoryGapLifecycle, HistoryGapPause, HistoryRepairCommand, |
| 81 | HistoryRepairPhase, HistoryRepairReport, HistoryRepairStop, |
| 82 | }; |
| 83 | pub use ruma; |
| 84 | pub use search_model::{ |
| 85 | RoomSearchCoverage, SearchBackfill, SearchCloseReason, SearchCommand, SearchCoverage, |
| 86 | SearchHit, SearchInMemory, SearchMatch, SearchPage, SearchScope, SearchSession, |
| 87 | }; |
| 88 | #[doc(hidden)] |
| 89 | pub use transport::PublicationAck; |
| 90 | pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy}; |
| 91 | pub use uiaa::{ |
| 92 | InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow, |
| 93 | InteractiveAuthOutcome, |
| 94 | }; |
| 95 | #[cfg(target_family = "wasm")] |
| 96 | pub use wasm::on_panic; |