| 1 | //! A compact application backend contract on top of the Matrix Rust SDK. |
| 2 | |
| 3 | mod encryption; |
| 4 | mod engine; |
| 5 | mod error; |
| 6 | #[cfg(feature = "mirror")] |
| 7 | mod mirror; |
| 8 | mod model; |
| 9 | mod normalise; |
| 10 | mod transport; |
| 11 | mod uiaa; |
| 12 | mod upload; |
| 13 | #[cfg(target_family = "wasm")] |
| 14 | mod wasm; |
| 15 | |
| 16 | #[cfg(all(feature = "sqlite", target_family = "wasm"))] |
| 17 | compile_error!("sqlite has no filesystem to live on in wasm, use indexeddb"); |
| 18 | #[cfg(all(feature = "indexeddb", not(target_family = "wasm")))] |
| 19 | compile_error!("indexeddb only exists in a browser, use sqlite"); |
| 20 | |
| 21 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 22 | mod account; |
| 23 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 24 | mod session_store; |
| 25 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 26 | mod store_lock; |
| 27 | |
| 28 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 29 | pub use account::{ |
| 30 | AccountError, OAuthApplicationType, OAuthLogin, PasswordLogin, PendingOAuthLogin, Restore, |
| 31 | Session, SessionRecord, SoftLogout, StoreConfig, UnsavedSession, |
| 32 | }; |
| 33 | #[cfg(any(feature = "sqlite", feature = "indexeddb"))] |
| 34 | pub use session_store::{EncryptedSessionStore, SessionStore}; |
| 35 | |
| 36 | pub use engine::{Engine, EngineConfig, EngineError}; |
| 37 | pub use error::{Error, ErrorKind}; |
| 38 | pub use imbl; |
| 39 | #[cfg(feature = "mirror")] |
| 40 | pub use mirror::{ |
| 41 | Mirror, MirrorHandle, SessionStatus, State, StateChange, Subscription, TimelineChange, |
| 42 | TimelineState, Update, UploadFailure, UploadState, |
| 43 | }; |
| 44 | pub use model::{ |
| 45 | AccountCommand, AttachmentEncryption, AttachmentUpload, Change, Command, CommandOutput, |
| 46 | ConnectionState, CreateRoomOptions, EncryptionCommand, EncryptionState, EngineErrorKind, |
| 47 | EngineFailure, Event, EventRef, HistoryState, KeyBackupState, LatestEvent, LifecycleCommand, |
| 48 | Media, MediaCommand, MediaDescriptor, MediaFile, MediaId, MediaKind, MediaLocation, MediaSize, |
| 49 | MemberFilter, MemberMembership, MemberSummary, MembershipChange, Message, MessageContent, |
| 50 | MessageEditContent, MessageKind, MessageMentions, NotificationCommand, OwnDevice, |
| 51 | PowerLevelChanges, Profile, PushNotification, PushNotificationEvent, PushNotificationRoom, |
| 52 | PushNotificationSender, PushNotificationStatus, Reaction, RecoveryState, ReplyDetails, |
| 53 | ReplyReference, Retain, RichText, RoomCategory, RoomCommand, RoomHero, RoomListFilter, |
| 54 | RoomMatcher, RoomMembership, RoomNotificationMode, RoomNotificationSettings, RoomPowerLevels, |
| 55 | RoomPreset, RoomSummary, RoomVisibility, SendState, Sender, SpaceChild, Termination, |
| 56 | ThreadSummary, TimelineCommand, TimelineContent, TimelineDiff, TimelineDiffError, |
| 57 | TimelineEvent, TimelineId, TimelineItem, TimelineItemId, TypingState, UploadDetails, |
| 58 | UploadOutcome, UploadThumbnail, UtdCause, VerificationAction, VerificationFailure, |
| 59 | VerificationState, VerificationTarget, |
| 60 | }; |
| 61 | pub use transport::{ClientHandle, EventStream, Pending, SpaceHierarchy}; |
| 62 | pub use uiaa::{ |
| 63 | InteractiveAuth, InteractiveAuthChallenge, InteractiveAuthFailure, InteractiveAuthFlow, |
| 64 | InteractiveAuthOutcome, |
| 65 | }; |
| 66 | #[cfg(target_family = "wasm")] |
| 67 | pub use wasm::on_panic; |